File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515 - uses : actions/setup-go@v5
1616 with :
17- go-version : " 1.26"
17+ go-version : " 1.26.5 "
1818 cache : true
1919
2020 - name : Download dependencies
Original file line number Diff line number Diff line change 3535
3636 - uses : actions/setup-go@v5
3737 with :
38- go-version : " 1.26"
38+ go-version : " 1.26.5 "
3939 cache : true
4040
4141 - name : Build binary
Original file line number Diff line number Diff line change 11# Build stage
2- FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS build
2+ FROM --platform=$BUILDPLATFORM golang:1.26.5 -alpine AS build
33WORKDIR /src
44COPY go.mod go.sum ./
55RUN go mod download
Original file line number Diff line number Diff line change 11module github.com/jovalle/goku
22
3- go 1.26.1
3+ go 1.26.5
44
55require (
66 github.com/beorn7/perks v1.0.1 // indirect
Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ build:
4848vulncheck :
4949 go run golang.org/ x/ vuln/ cmd/ govulncheck@latest ./ ...
5050
51+ # Propagate the go.mod Go version to the CI/release workflows and Dockerfile.
52+ sync-versions :
53+ @ gv=" $(awk '/^go [0-9]/ {print $2; exit}' go.mod)" ; \
54+ GV=" $gv" perl -i -pe ' s/(go-version:\s*")[\d.]+(")/$1$ENV{GV}$2/' \
55+ .github/ workflows/ ci.yml .github/ workflows/ release.yml; \
56+ GV=" $gv" perl -i -pe ' s/(golang:)[\d.]+(-alpine)/$1$ENV{GV}$2/' Dockerfile; \
57+ echo " Synced Go version to $gv across workflows and Dockerfile"
58+
5159run :
5260 go run ./ cmd/ goku
5361
@@ -57,4 +65,4 @@ docker:
5765clean :
5866 rm -rf bin/ coverage.out
5967
60- ci : lint test build vulncheck
68+ ci : sync-versions lint test build vulncheck
You can’t perform that action at this time.
0 commit comments