Skip to content

Commit

Permalink
ci(fix): use latest go version from upstream for building images
Browse files Browse the repository at this point in the history
  • Loading branch information
tprasadtp committed Jun 5, 2024
1 parent 1e79768 commit 30a76fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,19 @@ jobs:
with:
persist-credentials: false

# See - https://github.com/actions/setup-go/issues/407
- name: Check Latest Go Version from Upstream
id: latest-go-version
run: |
set -eo pipefail
output="$(curl -sfL "https://go.dev/dl/?mode=json" | jq -Mr '.[0].version')"
echo "output=${output}" | tee -a "${GITHUB_OUTPUT}"
# Always check for latest, as setup-go can be out of sync with upstream.
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
go-version: ${{ steps.latest-go-version.outputs.output }}
check-latest: true

- name: Setup syft
Expand Down

0 comments on commit 30a76fc

Please sign in to comment.