fix(ci): isolate gitops checkout dir

This commit is contained in:
Ashwin Kumar Sivakumar 2026-06-16 03:29:01 +05:30
parent 34f7bf744c
commit becc90b48c

View file

@ -54,8 +54,10 @@ jobs:
run: |
set -euo pipefail
image_ref="${IMAGE_NAME}@${{ steps.build.outputs.digest }}"
git clone "https://${{ secrets.GHCR_USERNAME }}:${GITOPS_TOKEN}@github.com/${GITOPS_REPO}.git" /tmp/nxtgauge-gitops
cd /tmp/nxtgauge-gitops
workdir="$(mktemp -d /tmp/nxtgauge-gitops.XXXXXX)"
trap 'rm -rf "$workdir"' EXIT
git clone "https://${{ secrets.GHCR_USERNAME }}:${GITOPS_TOKEN}@github.com/${GITOPS_REPO}.git" "$workdir"
cd "$workdir"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
for attempt in 1 2 3 4 5; do