Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command
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 21, 2024
1 parent 0af129d commit 01ce201
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
if: "${{ env.GCP_PROJECT_ID != '' }}"
run: echo "::set-output name=defined::true"
run: echo "defined=true" >> "$GITHUB_OUTPUT"

lint:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-sample-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
if: "${{ env.GCP_PROJECT_ID != '' }}"
run: echo "::set-output name=defined::true"
run: echo "defined=true" >> "$GITHUB_OUTPUT"
sample-test:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
if: "${{ env.GCP_PROJECT_ID != '' }}"
run: echo "::set-output name=defined::true"
run: echo "defined=true" >> "$GITHUB_OUTPUT"
integration-test:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ycsb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
if: "${{ env.GCP_PROJECT_ID != '' }}"
run: echo "::set-output name=defined::true"
run: echo "defined=true" >> "$GITHUB_OUTPUT"
ycsb-benchmark:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
Expand Down

0 comments on commit 01ce201

Please sign in to comment.