Skip to content

Commit

Permalink
ci: Use GITHUB_OUTPUT envvar instead of set-output command (#1310)
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 20, 2024
1 parent 4202fdb commit f7468e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
- name: Configure Go cache
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go cache
uses: actions/cache@v3
id: go-cache
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}
run: |
echo "Enable testing against cloud environments: ${{ env.KEY != '' }}"
echo "::set-output name=gotcloudcreds::${{ env.KEY != '' }}"
echo "gotcloudcreds=${{ env.KEY != '' }}" >> "$GITHUB_OUTPUT"
strategy:
fail-fast: true

Expand Down Expand Up @@ -161,8 +161,8 @@ jobs:
- name: Configure Go cache
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go cache
uses: actions/cache@v3
id: go-cache
Expand Down Expand Up @@ -219,8 +219,8 @@ jobs:
- name: Configure Go cache
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go cache
uses: actions/cache@v3
id: go-cache
Expand Down Expand Up @@ -331,8 +331,8 @@ jobs:
- name: Configure Go cache
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go cache
uses: actions/cache@v3
id: go-cache
Expand Down Expand Up @@ -386,8 +386,8 @@ jobs:
- name: Configure Go cache
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go cache
uses: actions/cache@v3
id: go-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-java-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- name: Configure Go cache
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
- name: Set up Go cache
uses: actions/cache@v3
id: go-cache
Expand Down

0 comments on commit f7468e1

Please sign in to comment.