Add secret to git
This commit is contained in:
parent
6009dfdb9a
commit
eab6e51948
@ -5,3 +5,6 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- apk add --no-cache git bash curl yq
|
- apk add --no-cache git bash curl yq
|
||||||
- bash automation/cloudflared-sync.sh
|
- bash automation/cloudflared-sync.sh
|
||||||
|
environment:
|
||||||
|
GIT_TOKEN:
|
||||||
|
from_secret: GIT_TOKEN
|
||||||
@ -12,7 +12,7 @@ mkdir -p .tmp-repos
|
|||||||
|
|
||||||
# === REPO CONFIG ===
|
# === REPO CONFIG ===
|
||||||
SANDBOX_REPO_URL="https://git.dvirlabs.com/dvirlabs/sandbox.git"
|
SANDBOX_REPO_URL="https://git.dvirlabs.com/dvirlabs/sandbox.git"
|
||||||
INFRA_REPO_URL="https://git.dvirlabs.com/dvirlabs/infra.git"
|
INFRA_REPO_URL="https://${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/infra.git"
|
||||||
SANDBOX_CLONE=".tmp-repos/sandbox"
|
SANDBOX_CLONE=".tmp-repos/sandbox"
|
||||||
INFRA_CLONE=".tmp-repos/infra"
|
INFRA_CLONE=".tmp-repos/infra"
|
||||||
GENERATED_FILE="generated-values/cloudflared-values.yaml"
|
GENERATED_FILE="generated-values/cloudflared-values.yaml"
|
||||||
@ -93,6 +93,7 @@ echo "📤 Pushing updated values.yaml to infra repo..."
|
|||||||
cd "$INFRA_CLONE"
|
cd "$INFRA_CLONE"
|
||||||
git config user.name "woodpecker-bot"
|
git config user.name "woodpecker-bot"
|
||||||
git config user.email "ci@dvirlabs.com"
|
git config user.email "ci@dvirlabs.com"
|
||||||
|
git remote set-url origin "https://${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/infra.git"
|
||||||
|
|
||||||
# Only commit if there are changes
|
# Only commit if there are changes
|
||||||
if ! git diff --quiet manifests/cloudflared/values.yaml; then
|
if ! git diff --quiet manifests/cloudflared/values.yaml; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user