Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command (#543)
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 31, 2024
1 parent 57ce800 commit c32cfc1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/chart-lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo "::set-output name=changed_charts::$charts"
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "changed_charts=$charts" >> "$GITHUB_OUTPUT"
fi
- name: Run Artifact Hub lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-acceptance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Create URL to the run output
id: vars
run: echo ::set-output name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
run: echo run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID >> "$GITHUB_OUTPUT"
- name: Update with Result
uses: peter-evans/create-or-update-comment@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly-pulumi-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
make dep-tidy
git update-index -q --refresh
if ! git diff-files --quiet; then
echo ::set-output name=changes::1
echo changes=1 >> "$GITHUB_OUTPUT"
fi
- name: Build codegen + Schema + SDKs
if: steps.gomod.outputs.changes != 0
Expand Down

0 comments on commit c32cfc1

Please sign in to comment.