Simplify Go version refs in CI templates

This commit is contained in:
Jesper Noordsij
2026-02-23 15:08:05 +01:00
committed by GitHub
parent 7a3ffcc3d9
commit c98fddbd03
8 changed files with 29 additions and 32 deletions
+2 -3
View File
@@ -10,7 +10,6 @@ on:
- 'script/gcg/**'
env:
GO_VERSION: '1.25'
CGO_ENABLED: 0
jobs:
@@ -55,12 +54,12 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
env:
ImageOS: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.goarm }}
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Artifact webui
+1
View File
@@ -35,6 +35,7 @@ jobs:
if: ${{ matrix.language == 'go' }}
with:
go-version-file: 'go.mod'
check-latest: true
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
+2 -3
View File
@@ -7,7 +7,6 @@ on:
- v*
env:
GO_VERSION: '1.25'
CGO_ENABLED: 0
jobs:
@@ -27,12 +26,12 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
env:
ImageOS: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.goarm }}
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Build
+2 -4
View File
@@ -6,7 +6,6 @@ on:
- 'v*.*.*'
env:
GO_VERSION: '1.25'
CGO_ENABLED: 0
VERSION: ${{ github.ref_name }}
TRAEFIKER_EMAIL: "traefiker@traefik.io"
@@ -34,13 +33,13 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
env:
# Ensure cache consistency on Linux, see https://github.com/actions/setup-go/pull/383
ImageOS: ${{ matrix.os }}
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Artifact webui
@@ -133,4 +132,3 @@ jobs:
gh release create ${VERSION} ./dist/**/traefik*.{zip,tar.gz} ./dist/traefik*.{tar.gz,txt} --repo traefik/traefik --title ${VERSION} --notes ${VERSION} --latest=false
./script/deploy.sh
+6 -7
View File
@@ -10,7 +10,6 @@ on:
- 'script/gcg/**'
env:
GO_VERSION: '1.25'
CGO_ENABLED: 0
jobs:
@@ -24,10 +23,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Avoid generating webui
@@ -41,7 +40,7 @@ jobs:
with:
path: |
~/.cache/go-build
key: ${{ runner.os }}-go-build-cache-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.mod', '**/go.sum') }}
- name: Artifact traefik binary
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
@@ -66,10 +65,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Avoid generating webui
@@ -89,7 +88,7 @@ jobs:
with:
path: |
~/.cache/go-build
key: ${{ runner.os }}-go-build-cache-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.mod', '**/go.sum') }}
- name: Generate go test Slice
id: test_split
+4 -7
View File
@@ -9,9 +9,6 @@ on:
- '**.md'
- 'script/gcg/**'
env:
GO_VERSION: '1.25'
jobs:
generate-packages:
@@ -25,10 +22,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Generate matrix
@@ -51,10 +48,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Avoid generating webui
+6 -7
View File
@@ -6,7 +6,6 @@ on:
- '*'
env:
GO_VERSION: '1.25'
GOLANGCI_LINT_VERSION: v2.10.1
MISSPELL_VERSION: v0.7.0
@@ -21,10 +20,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: golangci-lint
@@ -41,10 +40,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: Install misspell ${{ env.MISSPELL_VERSION }}
@@ -65,10 +64,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: 'go.mod'
check-latest: true
- name: go generate