Skip to content

Commit 3c6aa8d

Browse files
authored
Fix setup-go actions (#25167)
The `setup-go` actions did not all have `check-latest` which means they use some cached version of go that currently still resolves to go1.20.4, as seen in a number of recent runs that currently fail at govulncheck because of it: ```` Run actions/setup-go@v4 Setup go version spec >=1.20 Attempting to resolve the latest version from the manifest... matching >=1.20... Resolved as '1.20.4' ```` Add the [check-latest](https://github.com/actions/setup-go#check-latest-version) option which should guarantee that this cache is skipped.
1 parent 6d063a8 commit 3c6aa8d

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/cron-licenses.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ jobs:
1010
if: github.repository == 'go-gitea/gitea'
1111
steps:
1212
- uses: actions/checkout@v3
13-
- uses: actions/setup-go@v3
13+
- uses: actions/setup-go@v4
1414
with:
15-
go-version: ">=1.20.1"
15+
go-version: ">=1.20"
16+
check-latest: true
1617
- run: make generate-license generate-gitignore
1718
timeout-minutes: 40
1819
- name: push translations to repo

.github/workflows/pull-db-tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ jobs:
4141
- uses: actions/checkout@v3
4242
- uses: actions/setup-go@v4
4343
with:
44-
go-version: ">=1.20.0"
44+
go-version: ">=1.20"
45+
check-latest: true
4546
- name: Add hosts to /etc/hosts
4647
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
4748
- run: make deps-backend
@@ -65,7 +66,8 @@ jobs:
6566
- uses: actions/checkout@v3
6667
- uses: actions/setup-go@v4
6768
with:
68-
go-version: ">=1.20.0"
69+
go-version: ">=1.20"
70+
check-latest: true
6971
- run: make deps-backend
7072
- run: make backend
7173
env:
@@ -123,7 +125,8 @@ jobs:
123125
- uses: actions/checkout@v3
124126
- uses: actions/setup-go@v4
125127
with:
126-
go-version: ">=1.20.0"
128+
go-version: ">=1.20"
129+
check-latest: true
127130
- name: Add hosts to /etc/hosts
128131
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
129132
- run: make deps-backend
@@ -172,7 +175,8 @@ jobs:
172175
- uses: actions/checkout@v3
173176
- uses: actions/setup-go@v4
174177
with:
175-
go-version: ">=1.20.0"
178+
go-version: ">=1.20"
179+
check-latest: true
176180
- name: Add hosts to /etc/hosts
177181
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
178182
- run: make deps-backend
@@ -203,7 +207,8 @@ jobs:
203207
- uses: actions/checkout@v3
204208
- uses: actions/setup-go@v4
205209
with:
206-
go-version: ">=1.20.0"
210+
go-version: ">=1.20"
211+
check-latest: true
207212
- name: Add hosts to /etc/hosts
208213
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts'
209214
- run: make deps-backend
@@ -233,7 +238,8 @@ jobs:
233238
- uses: actions/checkout@v3
234239
- uses: actions/setup-go@v4
235240
with:
236-
go-version: ">=1.20.0"
241+
go-version: ">=1.20"
242+
check-latest: true
237243
- name: Add hosts to /etc/hosts
238244
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
239245
- run: make deps-backend

0 commit comments

Comments
 (0)