From 07a5339a5d3a3f4e8eaed6f383696a263d48abdc Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Mon, 8 Jul 2024 16:25:45 -0400 Subject: [PATCH] Upgrade actions to versions that run on node20 (#1771) --- .github/workflows/actionlint.yml | 5 +++-- .github/workflows/codeql.yml | 2 +- .github/workflows/go.yml | 33 +++++++++++++++++--------------- .github/workflows/lint.yml | 7 ++++--- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 1ef7a69bd..dbc85f8f7 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -15,12 +15,13 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go 1.x - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: './go.mod' check-latest: true + cache: false - name: install actionlint run: go install github.com/rhysd/actionlint/cmd/actionlint@latest - name: actionlint diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fee17edcb..e392f11b2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6be821fe1..57ea8a1f8 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,15 +25,16 @@ jobs: steps: - name: Check out code id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # need a full checkout for `git describe` - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: './go.mod' check-latest: true + cache: false id: go # use bash, because the powershell syntax is different and this is a cross platform workflow @@ -44,13 +45,13 @@ jobs: echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" - name: Go Build Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.go-cache-paths.outputs.go-build }} key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - name: Go Mod Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.go-cache-paths.outputs.go-mod }} key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} @@ -82,7 +83,7 @@ jobs: run: make test - name: Cache build output - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./build key: ${{ runner.os }}-${{ github.run_id }} @@ -90,10 +91,11 @@ jobs: # upload coverage here, because we don't cache it with the build - name: Upload coverage - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ runner.os }}-coverage.out - path: coverage.out + path: ./coverage.out + if-no-files-found: error # this job captures the version of launcher on one of the runners then that version is # compared to the version of all other runners during exec testing. This is to ensure @@ -106,7 +108,7 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: cache restore build output - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./build key: ${{ runner.os }}-${{ github.run_id }} @@ -136,7 +138,7 @@ jobs: needs: version_baseline steps: - name: cache restore build output - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./build key: ${{ runner.os }}-${{ github.run_id }} @@ -183,14 +185,14 @@ jobs: needs: exec_testing steps: - name: cache restore build output - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ./build key: ${{ matrix.artifactos }}-${{ github.run_id }} enableCrossOsArchive: true - name: Upload Build - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifactos }}-build path: build/ @@ -208,14 +210,15 @@ jobs: - macos-12 - windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # need a full checkout for `git describe` - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version-file: './go.mod' check-latest: true + cache: false id: go - id: go-cache-paths @@ -225,13 +228,13 @@ jobs: echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" - name: Go Build Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.go-cache-paths.outputs.go-build }} key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - name: Go Mod Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.go-cache-paths.outputs.go-mod }} key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3500b994e..4ef21608c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,13 +18,14 @@ jobs: name: lint runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: './go.mod' check-latest: true + cache: false - run: make deps @@ -45,7 +46,7 @@ jobs: name: govulncheck runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: govulncheck uses: golang/govulncheck-action@v1