Make the deploy stamp the version and fire on Go changes

Two things in the deploy did not do what they looked like:

build-server passed --build-arg APP_VERSION, but the Dockerfile declares
ARG VERSION. An unknown build arg is ignored with a warning, so every
deployed image was stamped "dev": `keeporgd -version` and the image's
version label both said so, whatever the tag claimed.

The build pipeline's path filter listed 'VERSION', a file this repository
does not have, and '*.go', which under doublestar matches only top-level
Go files, of which there are none. So a push that changed only Go code or
only the version did not trigger a build. Now versions.mk and '**/*.go'.

Proved: built with --build-arg VERSION=0.5.0 and ran -version in the
container, which now reports 0.5.0.
This commit is contained in:
2026-10-30 10:49:46 +01:00
parent 7eed722ff5
commit 3a499532f3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ when:
- 'config/variables/server.values.yaml' - 'config/variables/server.values.yaml'
- '.woodpecker/build.yaml' - '.woodpecker/build.yaml'
- 'Makefile' - 'Makefile'
- 'VERSION' - 'versions.mk'
- 'Dockerfile' - 'Dockerfile'
- '*.go' - '**/*.go'
event: push event: push
labels: labels:
role: production role: production
+1 -1
View File
@@ -240,7 +240,7 @@ nginx:
build-server: nginx build-server: nginx
podman build \ podman build \
--build-arg APP_VERSION=${VERSION_SERVER} \ --build-arg VERSION=${VERSION_SERVER} \
--platform=linux/arm64 \ --platform=linux/arm64 \
-t repo.rcmd.space/$(APP_NAME):$(VERSION_SERVER) \ -t repo.rcmd.space/$(APP_NAME):$(VERSION_SERVER) \
. .