diff --git a/polling-action/VERSION b/polling-action/VERSION index 359a5b9..50aea0e 100644 --- a/polling-action/VERSION +++ b/polling-action/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.1.0 \ No newline at end of file diff --git a/polling-action/action.yml b/polling-action/action.yml index a6e7d87..31bb7ac 100644 --- a/polling-action/action.yml +++ b/polling-action/action.yml @@ -66,7 +66,7 @@ outputs: runs: using: 'docker' - image: 'docker://ghcr.io/informatievlaanderen/awscurl-polling-action:2.0.0' + image: 'docker://ghcr.io/informatievlaanderen/awscurl-polling-action:2.1.0' args: - ${{ inputs.environment }} - ${{ inputs.version }} diff --git a/polling-action/main.py b/polling-action/main.py index 8978a98..9e341b2 100755 --- a/polling-action/main.py +++ b/polling-action/main.py @@ -20,20 +20,21 @@ status_responses = [] def sendWarning(message): - os.system(f'echo "::warning ::{message}"') + print(f'::warning::{message}') def sendFailed(message): - os.system(f'echo "::error ::{message}"') + print(f'::error::{message}') sys.exit(1) def sendGroupedOutput(group_name, body): - os.system(f'echo "::group::{group_name}"') + print(f'::group::{group_name}') for line in body: - os.system(f'echo "{line}"') - os.system(f'echo "::endgroup::"') + print(f'{line}') + print(f'::endgroup::') -def sendOutput(name,value): - os.system(f'echo "{name}={value}" >> $GITHUB_OUTPUT') +def sendOutput(name, value): + with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: + print(f'{name}={value}', file=fh) def exec(cmd): return (subprocess.Popen(cmd,