From a7e3a7cd9128a470374256f5f4a4509c31c059ce Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 15 Mar 2026 15:19:43 -0500 Subject: [PATCH] fix: use alpine/git with explicit checkout for tag-based release builds woodpeckerci/plugin-git:latest uses 'git switch' which fails on tag refs. Switch to alpine/git with explicit git fetch + checkout commands. Fixes: 'fatal: invalid reference: refs/tags/v*' in release pipeline. --- .woodpecker/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index 8cb0bd05..a5f2fa3f 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -1,10 +1,13 @@ --- clone: git: - image: woodpeckerci/plugin-git + image: alpine/git network_mode: gogs_default - environment: - - CI_REPO_CLONE_URL=http://gogs_app:3000/sarman/tftsr-devops_investigation.git + commands: + - git init -b master + - git remote add origin http://gogs_app:3000/sarman/tftsr-devops_investigation.git + - git fetch --depth=1 origin +refs/tags/${CI_COMMIT_TAG}:refs/tags/${CI_COMMIT_TAG} + - git checkout ${CI_COMMIT_TAG} pipeline: build-linux-amd64: