Skip to content

Commit

Permalink
ci: use GITHUB_OUTPUT envvar instead of set-output command (#271)
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 committed Jan 20, 2024
1 parent 6f572ba commit 72cb6da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Save PR id
id: pr
run: echo "::set-output name=id::$(<pr-id.txt)"
run: echo "id=$(<pr-id.txt)" >> "$GITHUB_OUTPUT"

- name: Download dist artifact
uses: dawidd6/action-download-artifact@v2
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:

- name: Save PR id
id: pr
run: echo "::set-output name=id::$(<pr-id.txt)"
run: echo "id=$(<pr-id.txt)" >> "$GITHUB_OUTPUT"

- name: The job failed
uses: actions-cool/maintain-one-comment@v2
Expand Down

0 comments on commit 72cb6da

Please sign in to comment.