From 0c2e4450f25a0af41e13e8a275f7f2fbb6214415 Mon Sep 17 00:00:00 2001 From: mivanchenko Date: Wed, 15 Jul 2026 18:28:00 +0200 Subject: [PATCH] Fix deploy pipeline: strip refs/heads/ prefix from dispatch ref input inputs.ref resolves fully-qualified (refs/heads/main) rather than the declared default "main", so git clone --branch was failing with "Remote branch refs/heads/main not found". Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/deploy-backoffice.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy-backoffice.yml b/.gitea/workflows/deploy-backoffice.yml index fd2a73a..ff8356d 100644 --- a/.gitea/workflows/deploy-backoffice.yml +++ b/.gitea/workflows/deploy-backoffice.yml @@ -25,10 +25,13 @@ jobs: - name: Checkout env: DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + DEPLOY_REF: ${{ inputs.ref }} run: | set -euo pipefail find . -mindepth 1 -delete - git clone --depth 1 --branch "${{ inputs.ref }}" \ + # inputs.ref comes through fully-qualified (refs/heads/main), not "main" + BRANCH="${DEPLOY_REF#refs/heads/}" + git clone --depth 1 --branch "$BRANCH" \ "http://${DEPLOY_TOKEN}@172.24.0.2:3000/BPPP/smb-online.git" . git remote set-url origin http://172.24.0.2:3000/BPPP/smb-online.git