Skip to content

Commit

Permalink
Fix deprecated set-output commands
Browse files Browse the repository at this point in the history
This fixes the deprecated set-output commands by using the new GITHUB_OUTPUT environment file.
> The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands

Signed-off-by: Rostyslav Sotnychenko <me@sota.sh>

Fixes #4
Fixes #5
  • Loading branch information
billputer authored and rsotnychenko committed Feb 6, 2023
1 parent 06e6b80 commit 9a0b456
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v1
- id: set_state_in_progress
name: Set deployment status to [in_progress]
uses: rsotnychenko/deployment-status-update@0.2.0
uses: rsotnychenko/deployment-status-update@0.2.1
with:
run_id: ${{ github.run_id }}
status: in_progress
Expand All @@ -56,7 +56,7 @@ jobs:
- id: set_state_final
if: always()
name: Set deployment status
uses: rsotnychenko/deployment-status-update@0.2.0
uses: rsotnychenko/deployment-status-update@0.2.1
with:
status: ${{ job.status }}
run_id: ${{ github.run_id }}
Expand Down
14 changes: 7 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ curl --fail \
}
EOF

echo ::set-output name=deployment_id::$(get_from_event '.deployment.id')
echo ::set-output name=description::$(get_from_event '.deployment.description')
echo ::set-output name=state::${INPUT_STATUS}
echo ::set-output name=ref::$(get_from_event '.deployment.ref')
echo ::set-output name=sha::$(get_from_event '.deployment.sha')
echo ::set-output name=environment::$(get_from_event '.deployment.environment')
echo ::set-output name=payload::$(get_from_event '.deployment.payload')
echo "deployment_id=$(get_from_event '.deployment.id')" >> $GITHUB_OUTPUT
echo "description=$(get_from_event '.deployment.description')" >> $GITHUB_OUTPUT
echo "state=${INPUT_STATUS}" >> $GITHUB_OUTPUT
echo "ref=$(get_from_event '.deployment.ref')" >> $GITHUB_OUTPUT
echo "sha=$(get_from_event '.deployment.sha')" >> $GITHUB_OUTPUT
echo "environment=$(get_from_event '.deployment.environment')" >> $GITHUB_OUTPUT
echo "payload=$(get_from_event '.deployment.payload')" >> $GITHUB_OUTPUT

0 comments on commit 9a0b456

Please sign in to comment.