Skip to content

Commit 3cd2a6c

Browse files
committed
fix(git): sync golang version
1 parent f677440 commit 3cd2a6c

5 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
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

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS build
2+
FROM --platform=$BUILDPLATFORM golang:1.26.5-alpine AS build
33
WORKDIR /src
44
COPY go.mod go.sum ./
55
RUN go mod download

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/jovalle/goku
22

3-
go 1.26.1
3+
go 1.26.5
44

55
require (
66
github.com/beorn7/perks v1.0.1 // indirect

justfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ build:
4848
vulncheck:
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+
5159
run:
5260
go run ./cmd/goku
5361

@@ -57,4 +65,4 @@ docker:
5765
clean:
5866
rm -rf bin/ coverage.out
5967

60-
ci: lint test build vulncheck
68+
ci: sync-versions lint test build vulncheck

0 commit comments

Comments
 (0)