ci: allow deploy-verso to trigger from git-bridge-test branch
Build and Deploy Verso / deploy (push) Has been cancelled

- Add git-bridge-test to push trigger branches
- Pass the triggering branch through to the k8s buildkit job via sed
  substitution (same pattern as NAV_TITLE), so workflow_dispatch from
  any branch also clones the right ref instead of always cloning main

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude
2026-06-23 20:06:24 +00:00
parent 8214ca6121
commit a7a569303c
+4 -2
View File
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- git-bridge-test
workflow_dispatch:
env:
@@ -19,7 +20,8 @@ jobs:
run: |
kubectl -n ci delete job verso-buildkit --ignore-not-found=true --wait=true
cat <<'EOF' | kubectl apply -f -
BRANCH=${GITEA_REF_NAME:-${GITHUB_REF_NAME:-main}}
cat <<'EOF' | sed "s|__BRANCH__|${BRANCH}|g" | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
@@ -38,7 +40,7 @@ jobs:
- |
set -eux
REG=registry.git.svc.cluster.local:5000
git clone --depth 1 https://git.alocoq.fr/alois/verso.git /workspace/repo
git clone --depth 1 --branch __BRANCH__ https://git.alocoq.fr/alois/verso.git /workspace/repo
# (#1) Build the base image only when it actually changes.
# The base layers' only repo input is Dockerfile-base, so