Skip to content

Commit 18857e6

Browse files
committed
ci: upgrades go version to latest stable version to resolve security vulnerability bug
Signed-off-by: Rosy-Glorious Miki <rmiki@redhat.com>
1 parent 8e7a7e1 commit 18857e6

4 files changed

Lines changed: 26 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}
1010
cancel-in-progress: true
1111

12+
env:
13+
GOTOOLCHAIN: auto
1214
jobs:
1315

1416
test-makefile:
@@ -20,7 +22,8 @@ jobs:
2022
fetch-depth: 0
2123
- uses: actions/setup-go@v6
2224
with:
23-
go-version: "1.25"
25+
go-version: 'stable'
26+
check-latest: true
2427
cache: true
2528
- name: Install dependencies
2629
run: |
@@ -46,10 +49,16 @@ jobs:
4649
steps:
4750
- name: Check out repository
4851
uses: actions/checkout@v6
52+
- name: Set up GO
53+
uses: actions/setup-go@v6
54+
with:
55+
go-version: 'stable'
56+
check-latest: true
57+
cache: true
4958
- name: Install dependencies
5059
run: |
5160
dnf update -y
52-
dnf install -y golang make tar diffutils bzip2 gzip curl git which
61+
dnf install -y make tar diffutils bzip2 gzip curl git which
5362
- name: Mark repo as safe for git
5463
run: git config --global --add safe.directory $GITHUB_WORKSPACE
5564
- name: Build and test
@@ -107,7 +116,8 @@ jobs:
107116
uses: actions/checkout@v6
108117
- uses: actions/setup-go@v6
109118
with:
110-
go-version: "1.25"
119+
go-version: 'stable'
120+
check-latest: true
111121
cache: true
112122
- name: Install dependencies
113123
run: |

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77

88
permissions:
99
contents: write
10-
10+
env:
11+
GOTOOLCHAIN: auto
1112
jobs:
1213
goreleaser:
1314
runs-on: ubuntu-latest
@@ -20,7 +21,8 @@ jobs:
2021
- name: Set up Go
2122
uses: actions/setup-go@v5
2223
with:
23-
go-version: '1.26.1'
24+
go-version: 'stable'
25+
check-latest: true
2426

2527
- name: Run GoReleaser
2628
uses: goreleaser/goreleaser-action@v7

.github/workflows/security.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
branches: [ main ]
88
schedule:
99
- cron: '0 6 * * *'
10-
10+
env:
11+
GOTOOLCHAIN: auto
1112
jobs:
1213
vulnerability-scan:
1314
name: Vulnerability Scanning
@@ -19,7 +20,8 @@ jobs:
1920
- name: Set up Go
2021
uses: actions/setup-go@v6
2122
with:
22-
go-version: '1.25'
23+
go-version: 'stable'
24+
check-latest: true
2325

2426
- name: Install govulncheck
2527
run: go install golang.org/x/vuln/cmd/govulncheck@latest
@@ -47,7 +49,8 @@ jobs:
4749
- name: Set up Go
4850
uses: actions/setup-go@v6
4951
with:
50-
go-version: '1.25'
52+
go-version: 'stable'
53+
check-latest: true
5154

5255
- name: Initialize CodeQL
5356
uses: github/codeql-action/init@v4

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/containers/tar-diff
22

3-
go 1.25
3+
go 1.26
4+
5+
toolchain go1.26.2
46

57
require (
68
github.com/containers/image/v5 v5.36.2

0 commit comments

Comments
 (0)