Skip to content

Commit

Permalink
WIP: Try dumping action to JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
br3ndonland committed Jun 1, 2024
1 parent a8d6be4 commit cf205c4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions create-docker-action.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import json
import os
import pathlib

import yaml

DESCRIPTION = 'description'
REQUIRED = 'required'

Expand Down Expand Up @@ -74,6 +73,4 @@ def set_image(event: str, ref: str, repo: str) -> str:

action_path = pathlib.Path('.github/actions/run-docker-container/action.yml')
action_path.parent.mkdir(parents=True, exist_ok=True)

with action_path.open(mode='w', encoding='utf-8') as file:
yaml.dump(action, file, allow_unicode=True, sort_keys=False)
action_path.write_text(json.dumps(action, ensure_ascii=False), encoding='utf-8')

0 comments on commit cf205c4

Please sign in to comment.