fix(ci): isolate gitops checkout dir
This commit is contained in:
parent
9b6f8a313b
commit
79ac24217a
1 changed files with 4 additions and 2 deletions
6
.github/workflows/build-and-deploy-ghcr.yml
vendored
6
.github/workflows/build-and-deploy-ghcr.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue