fix(ci): use git switch to avoid deploy dir/branch ambiguity
Build and Deploy / build-and-push (push) Successful in 20s

'git checkout deploy' is ambiguous because the repo contains both a
deploy/ directory and a deploy remote tracking branch. Switch to
'git switch' which is branch-only and unambiguous.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
funman300
2026-05-27 14:44:35 -07:00
parent c2eff2ed96
commit 25c43db61e
+6 -1
View File
@@ -66,7 +66,12 @@ jobs:
git config user.email "ci@gitea.local"
git config user.name "Gitea CI"
# Switch to the deploy branch, creating it from the current HEAD if absent.
git fetch origin deploy 2>/dev/null && git checkout deploy || git checkout -b deploy
# Use 'git switch' (branch-only) to avoid ambiguity with the deploy/ directory.
if git fetch origin deploy 2>/dev/null; then
git switch deploy
else
git switch -c deploy
fi
# Update the pinned image tag.
cd deploy
kustomize edit set image solitaire-server=${{ env.IMAGE }}:${{ steps.meta.outputs.sha }}