RC: (debug) workflow not pushing to chart
Some checks failed
Build and Update Flux / build-push-update (push) Failing after 43s
Some checks failed
Build and Update Flux / build-push-update (push) Failing after 43s
This commit is contained in:
@@ -49,19 +49,28 @@ jobs:
|
||||
|
||||
- name: Update Helm values.yaml for Flux
|
||||
run: |
|
||||
# Go into the downloaded infrastructure repo
|
||||
cd infra-workspace
|
||||
|
||||
# 1. Update the image tag in your local Helm chart using sed
|
||||
echo "--- TARGET FILE BEFORE ---"
|
||||
cat charts/slashroot/values.yaml
|
||||
|
||||
# The sed command (Make sure the path matches perfectly!)
|
||||
sed -i "s/tag: .*/tag: ${{ gitea.sha }}/g" charts/slashroot/values.yaml
|
||||
|
||||
# 2. Configure the Gitea Bot to commit the change
|
||||
echo "--- TARGET FILE AFTER ---"
|
||||
cat charts/slashroot/values.yaml
|
||||
|
||||
# Set up Git
|
||||
git config user.name "Gitea Actions Bot"
|
||||
git config user.email "actions@gitea.local"
|
||||
git add charts/slashroot/values.yaml
|
||||
|
||||
# Commit and Push back to the Infra Repo
|
||||
git add .
|
||||
git commit -m "BOT: (bump) slashroot-cc update: ${{ gitea.sha }}"
|
||||
|
||||
# Push the changes (The token we provided earlier handles authentication)
|
||||
# Check if there are actually changes to commit
|
||||
if git diff --staged --quiet; then
|
||||
echo "❌ ERROR: No changes were made! Check if 'tag: ' actually exists in your values.yaml"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ Changes detected! Committing and pushing..."
|
||||
git commit -m "chore: deploy slashroot-cc update ${{ gitea.sha }} [skip ci]"
|
||||
git push origin main
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user