mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 11:33:17 +00:00
62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
name: Update Charts
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 3 * * *' # Every day at 3 AM
|
|
workflow_dispatch: # Manual trigger
|
|
|
|
jobs:
|
|
update-charts:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Environment
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y jq
|
|
|
|
- name: Run Update Script
|
|
run: |
|
|
chmod +x scripts/update-charts.sh
|
|
./scripts/update-charts.sh
|
|
|
|
- name: Check for Changes
|
|
id: git-check
|
|
run: |
|
|
if [ -f update_summary.txt ]; then
|
|
echo "updates=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "updates=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Commit and Push Changes
|
|
if: steps.git-check.outputs.updates == 'true'
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add .
|
|
git commit -m "chore: Automated version update for Helm charts"
|
|
git push
|
|
|
|
- name: Send Signal Notification
|
|
if: |
|
|
steps.git-check.outputs.updates == 'true' &&
|
|
secrets.SIGNAL_URL != '' &&
|
|
secrets.SIGNAL_SENDER != '' &&
|
|
secrets.SIGNAL_RECIPIENT != ''
|
|
run: |
|
|
SUMMARY=$(cat update_summary.txt)
|
|
MESSAGE="🚀 **Helm Charts Updated**\n\n$SUMMARY\n\nView changes: https://github.com/shadoll/helm-charts/commits/main"
|
|
|
|
curl -X POST "${{ secrets.SIGNAL_URL }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{
|
|
\"message\": \"$MESSAGE\",
|
|
\"number\": \"${{ secrets.SIGNAL_SENDER }}\",
|
|
\"recipients\": [\"${{ secrets.SIGNAL_RECIPIENT }}\"]
|
|
}"
|