Skip to content

Commit c0d45aa

Browse files
authored
Merge pull request #156 from klihub/fixes/update-ci-workflow
.github: update project-checks, use local install-go action in CI workflow.
2 parents 25cd300 + e4a8053 commit c0d45aa

2 files changed

Lines changed: 28 additions & 16 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Setup Go"
2+
description: "Reusable action to install Go, so there is one place to bump Go versions"
3+
inputs:
4+
go-version:
5+
required: true
6+
default: "1.23.7"
7+
description: "Go version to install"
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: "Setup Go"
13+
uses: actions/setup-go@v5
14+
with:
15+
go-version: ${{ inputs.go-version }}
16+
cache: false # see actions/setup-go#368

.github/workflows/ci.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ jobs:
1414
timeout-minutes: 5
1515

1616
steps:
17-
- uses: actions/setup-go@v5
18-
with:
19-
go-version: 1.21.x
20-
2117
- name: Set env
2218
shell: bash
2319
# TODO(thaJeztah): remove working-directory, path, and GOPATH once project-checks stops needing them; see https://github.com/containerd/nri/pull/53/commits/872fb0ce3dce136f3ae67c068ce78607565194ef#r1324366346
@@ -30,7 +26,9 @@ jobs:
3026
path: src/github.com/containerd/nri
3127
fetch-depth: 25
3228

33-
- uses: containerd/project-checks@v1
29+
- uses: ./src/github.com/containerd/nri/.github/actions/install-go
30+
31+
- uses: containerd/project-checks@v1.2.2
3432
with:
3533
working-directory: src/github.com/containerd/nri
3634

@@ -41,9 +39,7 @@ jobs:
4139

4240
steps:
4341
- uses: actions/checkout@v4
44-
- uses: actions/setup-go@v5
45-
with:
46-
go-version: 1.21.x
42+
- uses: ./.github/actions/install-go
4743

4844
# needed for wasm plugins
4945
- uses: acifani/setup-tinygo@v2
@@ -78,23 +74,23 @@ jobs:
7874

7975
strategy:
8076
matrix:
81-
go: [1.22.3]
77+
go-version: ["1.23.7", "1.24.1"]
8278
os: [ubuntu-22.04]
8379

8480
steps:
8581
- uses: actions/checkout@v4
86-
- uses: actions/setup-go@v5
82+
- uses: ./.github/actions/install-go
8783
with:
88-
go-version: ${{ matrix.go }}
84+
go-version: ${{ matrix.go-version }}
8985

9086
- name: Set env
9187
shell: bash
9288
run: |
9389
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
9490
95-
- uses: golangci/golangci-lint-action@v3
91+
- uses: golangci/golangci-lint-action@v6
9692
with:
97-
version: v1.58.0
93+
version: v1.64.8
9894

9995
tests:
10096
name: Tests
@@ -103,13 +99,13 @@ jobs:
10399

104100
strategy:
105101
matrix:
106-
go: [1.21.x, 1.22.3]
102+
go-version: ["1.23.7", "1.24.1"]
107103

108104
steps:
109105
- uses: actions/checkout@v4
110-
- uses: actions/setup-go@v5
106+
- uses: ./.github/actions/install-go
111107
with:
112-
go-version: ${{ matrix.go }}
108+
go-version: ${{ matrix.go-version }}
113109

114110
- name: Set env
115111
shell: bash

0 commit comments

Comments
 (0)