Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-25 11:16:11 +01:00

Merge pull request 'chore(ci): do not hardcode go version, use go.mod instead' (#4792) from earl-warren/forgejo:wip-go-mod into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4792
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: thefox <thefox@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-08-03 14:51:59 +00:00
commit e99be039d4
6 changed files with 14 additions and 18 deletions

View file

@ -0,0 +1,3 @@
module code.gitea.io/gitea
go 1.22.5

View file

@ -43,8 +43,7 @@ jobs:
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- name: version from ref
id: release-info

View file

@ -19,8 +19,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- run: |
apt-get -qq update
apt-get -qq install -q sudo

View file

@ -74,8 +74,7 @@ jobs:
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- name: update the _release.experimental DNS record
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
uses: https://code.forgejo.org/actions/ovh-dns-update@v1

View file

@ -22,8 +22,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- run: make deps-backend deps-tools
- run: make --always-make -j$(nproc) lint-backend tidy-check swagger-check fmt-check swagger-validate # ensure the "go-licenses" make target runs
frontend-checks:
@ -62,7 +61,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
go-version-file: "go.mod"
- run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
@ -121,7 +120,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
go-version-file: "go.mod"
- run: |
git config --add safe.directory '*'
adduser --quiet --comment forgejo --disabled-password forgejo
@ -167,7 +166,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
go-version-file: "go.mod"
- name: install dependencies & git >= 2.42
run: |
export DEBIAN_FRONTEND=noninteractive
@ -216,7 +215,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
go-version-file: "go.mod"
- name: install dependencies & git >= 2.42
run: |
export DEBIAN_FRONTEND=noninteractive
@ -254,7 +253,7 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
go-version-file: "go.mod"
- name: install dependencies & git >= 2.42
run: |
export DEBIAN_FRONTEND=noninteractive
@ -297,7 +296,6 @@ jobs:
- uses: https://code.forgejo.org/actions/checkout@v3
- uses: https://code.forgejo.org/actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
go-version-file: "go.mod"
- run: make deps-backend deps-tools
- run: make security-check

4
go.mod
View file

@ -1,8 +1,6 @@
module code.gitea.io/gitea
go 1.22.0
toolchain go1.22.5
go 1.22.5
require (
code.forgejo.org/f3/gof3/v3 v3.4.0