From 055854d1d74476989bd4af8315625ec88a6835d1 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 4 Dec 2024 10:12:38 +0100 Subject: [PATCH] build: use go toolchain --- .forgejo/workflows/test.yml | 10 ++++++++++ go.mod | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index c4b7be1..c2e278e 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -44,6 +44,16 @@ jobs: with: go-version-file: go.mod + - name: validate go version + run: | + set -ex + toolchain=$(grep -oP '(?<=toolchain ).+' go.mod) + version=$(go version | cut -d' ' -f3) + if [ "$toolchain" != "$version" ]; then + echo "go version mismatch: $toolchain <> $version" + exit 1 + fi + - run: make vet - run: make build diff --git a/go.mod b/go.mod index 601f766..148bfe2 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module gitea.com/gitea/act_runner -go 1.23.3 +go 1.23 + +toolchain go1.23.3 require ( code.gitea.io/actions-proto-go v0.4.0