From 06b1e84f998afdafaf138c20eacb3aae0d1b2e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Sch=C3=A4fer?= Date: Tue, 21 Oct 2025 01:20:08 +0200 Subject: [PATCH] feat(ci): add step to update version in main.go during CI/CD pipeline --- .github/workflows/cicd.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 5b1b891..010df57 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -38,6 +38,16 @@ jobs: with: go-version: 1.25 + - name: Update version in main.go + run: | + TAG=${{ env.TAG }} + if [ -f main.go ]; then + sed -i 's/version_replaceme/'"$TAG"'/' main.go + echo "Updated main.go with version $TAG" + else + echo "main.go not found" + fi + - name: Build and push Docker images run: | TAG=${{ env.TAG }}