Skip to content

Commit

Permalink
actions: Replace deprecated set-output command (#26800)
Browse files Browse the repository at this point in the history
GitHub [is deprecating][1] the `::set-output` command in favor of writing
key-value pairs to a file.

Also of note is that the file uses a different mechanism for setting
values containing newlines. We only had one instance of that.

[1]: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/3244078234
  • Loading branch information
anomiex authored and matticbot committed Oct 13, 2022
1 parent 831ab69 commit fab4147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autotagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
exit 1
elif [[ -n "$PREFIX" && "$GITHUB_REF" == "refs/heads/trunk" ]]; then
echo "::notice::Ignoring push to trunk, as this project has a release branch prefix set (\"$PREFIX\")"
echo "::set-output name=run::false"
echo "run=false" >> "$GITHUB_OUTPUT"
elif [[ -n "$PREFIX" && "$GITHUB_REF" != "refs/heads/$PREFIX/branch-"* ]]; then
echo "::error::Expected to be called for \"refs/heads/$PREFIX/branch-*\", not \"$GITHUB_REF\""
exit 1
else
echo "Push to \"$GITHUB_REF\" ok"
echo "::set-output name=run::true"
echo "run=true" >> "$GITHUB_OUTPUT"
fi
- name: Tag
Expand Down

0 comments on commit fab4147

Please sign in to comment.