fix: Correct GitHub Actions secrets context handling

This commit is contained in:
sha
2026-03-16 01:40:48 +02:00
parent 46ddaa5f4b
commit 644bec91b4
+12 -8
View File
@@ -43,19 +43,23 @@ jobs:
git push git push
- name: Send Signal Notification - name: Send Signal Notification
if: | if: steps.git-check.outputs.updates == 'true'
steps.git-check.outputs.updates == 'true' && env:
secrets.SIGNAL_URL != '' && SIGNAL_URL: ${{ secrets.SIGNAL_URL }}
secrets.SIGNAL_SENDER != '' && SIGNAL_SENDER: ${{ secrets.SIGNAL_SENDER }}
secrets.SIGNAL_RECIPIENT != '' SIGNAL_RECIPIENT: ${{ secrets.SIGNAL_RECIPIENT }}
run: | run: |
if [ -z "$SIGNAL_URL" ] || [ -z "$SIGNAL_SENDER" ] || [ -z "$SIGNAL_RECIPIENT" ]; then
echo "Signal secrets not fully configured, skipping notification."
exit 0
fi
SUMMARY=$(cat update_summary.txt) SUMMARY=$(cat update_summary.txt)
MESSAGE="🚀 **Helm Charts Updated**\n\n$SUMMARY\n\nView changes: https://github.com/shadoll/helm-charts/commits/main" MESSAGE="🚀 **Helm Charts Updated**\n\n$SUMMARY\n\nView changes: https://github.com/shadoll/helm-charts/commits/main"
curl -X POST "${{ secrets.SIGNAL_URL }}" \ curl -X POST "$SIGNAL_URL" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{ -d "{
\"message\": \"$MESSAGE\", \"message\": \"$MESSAGE\",
\"number\": \"${{ secrets.SIGNAL_SENDER }}\", \"number\": \"$SIGNAL_SENDER\",
\"recipients\": [\"${{ secrets.SIGNAL_RECIPIENT }}\"] \"recipients\": [\"$SIGNAL_RECIPIENT\"]
}" }"