fix(ci): isolate gitops checkout dir

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

View file

@ -76,8 +76,10 @@ jobs:
GITOPS_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }} GITOPS_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
run: | run: |
set -euo pipefail set -euo pipefail
git clone "https://${{ secrets.GHCR_USERNAME }}:${GITOPS_TOKEN}@github.com/${GITOPS_REPO}.git" /tmp/nxtgauge-gitops workdir="$(mktemp -d /tmp/nxtgauge-gitops.XXXXXX)"
cd /tmp/nxtgauge-gitops 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.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
for attempt in 1 2 3 4 5; do for attempt in 1 2 3 4 5; do