From 8e6dc3a7c919b823802a21e3cb5c4026affad30d Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Fri, 5 Jan 2024 14:46:22 +0100 Subject: [PATCH] chore(ci): use `go-version-file` for `setup-go` action. Moreover, switch to setup-go@v4 that supports caching by default. Signed-off-by: Federico Di Pierro --- .github/workflows/ci.yml | 5 ++--- .github/workflows/release.yml | 4 ++-- .github/workflows/reusable_build_test_driverkit.yml | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a8118bd..dc240e62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,10 +31,9 @@ jobs: persist-credentials: false - name: Setup Go - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + uses: actions/setup-go@v4 with: - go-version: '1.21' - check-latest: true + go-version-file: 'go.mod' - name: Execute go mod tidy and check the outcome working-directory: ./ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 110c6297..6d600da6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,9 +51,9 @@ jobs: run: git fetch --prune --force --tags - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: '1.21' + go-version-file: 'go.mod' - name: Install GoReleaser uses: goreleaser/goreleaser-action@v5 diff --git a/.github/workflows/reusable_build_test_driverkit.yml b/.github/workflows/reusable_build_test_driverkit.yml index d479f690..5297eca7 100644 --- a/.github/workflows/reusable_build_test_driverkit.yml +++ b/.github/workflows/reusable_build_test_driverkit.yml @@ -18,9 +18,9 @@ jobs: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: '1.21' + go-version-file: 'go.mod' - name: Build run: make build