From 6009dfdb9ab5cd2a4d952a97d1c671336557002c Mon Sep 17 00:00:00 2001 From: dvirlabs <114520947+dvirlabs@users.noreply.github.com> Date: Thu, 19 Jun 2025 22:57:09 +0300 Subject: [PATCH] Test the merge to infra --- automation/cloudflared-sync.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/automation/cloudflared-sync.sh b/automation/cloudflared-sync.sh index 3dcf23f..41c81ce 100644 --- a/automation/cloudflared-sync.sh +++ b/automation/cloudflared-sync.sh @@ -88,9 +88,19 @@ echo "✅ Final merged values.yaml:" cat "$MERGED_FILE" # === STEP 5: Optional push to Git === -# cd "$INFRA_CLONE" -# git config user.name "woodpecker-bot" -# git config user.email "ci@dvirlabs.com" -# git add manifests/cloudflared/values.yaml -# git commit -m "chore(cloudflared): auto-add ingress from sandbox" -# git push +echo "📤 Pushing updated values.yaml to infra repo..." + +cd "$INFRA_CLONE" +git config user.name "woodpecker-bot" +git config user.email "ci@dvirlabs.com" + +# Only commit if there are changes +if ! git diff --quiet manifests/cloudflared/values.yaml; then + git add manifests/cloudflared/values.yaml + git commit -m "chore(cloudflared): auto-merge CNAME entries from sandbox" + git push origin HEAD + echo "✅ Changes pushed successfully." +else + echo "â„šī¸ No changes to commit." +fi +