fix(ci): isolate gitops checkout dir
This commit is contained in:
parent
d2e7aee81b
commit
a38a2fd185
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
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue