Skip to content

Commit a360fcb

Browse files
committed
Dump action as JSON
1 parent a869dd3 commit a360fcb

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ runs:
130130
- name: Create Docker container action
131131
run: |
132132
# Create Docker container action
133-
python -m pip install -r requirements/github-actions.txt
134-
python create-docker-action.py ${{ steps.set-image.outputs.image }}
133+
python create-docker-action.py
135134
env:
136135
EVENT: ${{ github.event_name }}
137136
REF: ${{ steps.set-repo-and-ref.outputs.ref }}

create-docker-action.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import json
12
import os
23
import pathlib
34

4-
import yaml
5-
65
DESCRIPTION = 'description'
76
REQUIRED = 'required'
87

@@ -83,6 +82,4 @@ def set_image(event: str, ref: str, repo: str) -> str:
8382

8483
action_path = pathlib.Path('.github/actions/run-docker-container/action.yml')
8584
action_path.parent.mkdir(parents=True, exist_ok=True)
86-
87-
with action_path.open(mode='w', encoding='utf-8') as file:
88-
yaml.dump(action, file, allow_unicode=True, sort_keys=False)
85+
action_path.write_text(json.dumps(action, ensure_ascii=False), encoding='utf-8')

requirements/github-actions.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/github-actions.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)