diff --git a/.github/workflows/update-charts.yml b/.github/workflows/update-charts.yml new file mode 100644 index 0000000..7242cd4 --- /dev/null +++ b/.github/workflows/update-charts.yml @@ -0,0 +1,61 @@ +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 }}\"] + }" diff --git a/README.md b/README.md index 45a5445..6279769 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,11 @@ spec: ## Maintenance -This repository follows automated version tracking where possible. For manual updates, modify the `appVersion` and increment the `version` in the respective `Chart.yaml`. +To enable automated Signal alerts for chart updates, configure the following **GitHub Secrets** in this repository: + +- `SIGNAL_URL`: The full URL to your Signal gateway (e.g. `https://signal.h.shadoll.dev/v2/send`). +- `SIGNAL_SENDER`: The phone number used to send the message. +- `SIGNAL_RECIPIENT`: The phone number(s) to receive the alert. --- © 2026 Shadoll. Managed with ❤️ for the Home Lab.