Skip to content

Commit

Permalink
fix: update deprecated print output
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Sep 23, 2024
1 parent bb3cf3d commit 6ee005b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion polling-action/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.1.0
2 changes: 1 addition & 1 deletion polling-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
15 changes: 8 additions & 7 deletions polling-action/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6ee005b

Please sign in to comment.