Skip to content

Commit

Permalink
Upgrade actions to versions that run on node20 (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Jul 8, 2024
1 parent 3204ad5 commit 07a5339
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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') }}
Expand Down Expand Up @@ -82,18 +83,19 @@ 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 }}
enableCrossOsArchive: true

# 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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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/
Expand All @@ -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
Expand All @@ -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') }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 07a5339

Please sign in to comment.