fix(ci): isolate gitops checkout dir
This commit is contained in:
parent
d132f957b4
commit
d66ef693e5
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: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
image_ref="${IMAGE_NAME}@${{ steps.build.outputs.digest }}"
|
image_ref="${IMAGE_NAME}@${{ steps.build.outputs.digest }}"
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue