Skip to content

Commit

Permalink
update names
Browse files Browse the repository at this point in the history
  • Loading branch information
gopidesupavan committed Dec 1, 2024
1 parent 5ae60d8 commit f225097
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 145 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/custom-action-example.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/python-publish.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/svn-checkout.yml

This file was deleted.

2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
required: false
default: 'temp-svn-repo'
mode:
description: 'Mode to run the action'
description: 'Mode to operate publish or verify'
required: false
default: 'verify'

Expand Down
8 changes: 4 additions & 4 deletions src/scripts/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
DEFAULT_CHECK_SUM_SCRIPT = "{github_action_path}/src/scripts/checksum_check.sh"


def set_default_config(config_data):
def set_default_config(config_data: dict):
svn_checker_script = config_data.get("publishers", {}).get("rules", {}).get("svn-check", {}).get("script")
if not svn_checker_script:
config_data["publishers"]["rules"]["svn-check"]["script"] = DEFAULT_SVN_CHECKER_SCRIPT.format(github_action_path=os.environ.get("GITHUB_ACTION_PATH"))
Expand All @@ -19,16 +19,16 @@ def set_default_config(config_data):
return config_data


def parse_config(path):
def parse_config(path: str):
with open(path, 'r') as file:
config_data = yaml.safe_load(file)

updated_config_data = set_default_config(config_data)

def set_multiline_output(name, updated_data):
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
value = json.dumps(updated_data)
fh.write(f'{name}={value}')
f.write(f'{name}={value}')

set_multiline_output("pub_config", updated_config_data)

Expand Down

0 comments on commit f225097

Please sign in to comment.