Update Go version to 1.26 and adjust workflows and Dockerfile accordingly

Signed-off-by: Marc Schäfer <git@marcschaeferger.de>
This commit is contained in:
Marc Schäfer
2026-04-04 02:00:13 +02:00
parent 279fc427a8
commit 9e5539a5ba
4 changed files with 13 additions and 6 deletions

View File

@@ -16,10 +16,14 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Read go version
id: goversion
run: echo "version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: 1.25
go-version: ${{ steps.goversion.outputs.version }}
- name: Build go
run: go build

View File

@@ -1 +1 @@
1.25
1.26

View File

@@ -1,4 +1,5 @@
FROM golang:1.26-alpine AS builder
ARG GO_VERSION=1.26
FROM golang:${GO_VERSION}-alpine AS builder
# Set the working directory inside the container
WORKDIR /app
@@ -25,4 +26,4 @@ COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["gerbil"]
CMD ["gerbil"]

View File

@@ -1,4 +1,6 @@
GO_VERSION := $(shell cat .go-version 2>/dev/null)
all: build push
docker-build-release:
@@ -7,10 +9,10 @@ docker-build-release:
exit 1; \
fi
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/gerbil:latest -f Dockerfile --push .
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/gerbil:$(tag) -f Dockerfile --push .
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/gerbil:$(tag) -f Dockerfile --build-arg GO_VERSION=$(GO_VERSION) --push .
build:
docker build -t fosrl/gerbil:latest .
docker build -t fosrl/gerbil:latest --build-arg GO_VERSION=$(GO_VERSION) .
push:
docker push fosrl/gerbil:latest