Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command (#121)
Browse files Browse the repository at this point in the history
`save-state` and `set-output` commands used in GitHub Actions are deprecated and [GitHub recommends using environment files](https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/).

This PR updates the usage of `::set-output` to `"$GITHUB_OUTPUT"`

Instructions for envvar usage from GitHub docs:

https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
  • Loading branch information
arunsathiya authored Jan 23, 2024
1 parent eaefa96 commit 3ea0e5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
id: definitions
run: |
export MSRV=$(cat rust-toolchain | awk '{$1=$1};1')
echo "::set-output name=msrv::$MSRV"
echo "msrv=$MSRV" >> "$GITHUB_OUTPUT"
export RAW_VERSIONS="stable beta $RUST_NIGHTLY_TOOLCHAIN $MSRV"
export VERSIONS=$(echo $RAW_VERSIONS | jq -scR 'rtrimstr("\n")|split(" ")|.')
echo "::set-output name=versions::$VERSIONS"
echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT"
rustfmt:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3ea0e5c

Please sign in to comment.