dynamic endpoints

This commit is contained in:
2026-03-23 21:31:50 -04:00
parent 03791ecca8
commit 816ec8fd6b
6 changed files with 204 additions and 19 deletions

View File

@@ -0,0 +1,32 @@
name: Signal Notification
on:
workflow_run:
workflows: ["CI"]
types: [completed]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Signal on failure
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
run: |
curl -sf -X POST "${{ secrets.SIGNAL_ENDPOINT }}/ci" \
-H "Content-Type: application/json" \
-H "X-CI-Secret: ${{ secrets.SIGNAL_API_KEY }}" \
-d '{
"source": "${{ github.repository }}",
"message": "❌ Workflow \"${{ github.event.workflow_run.name }}\" failed on ${{ github.event.workflow_run.head_branch }}\n${{ github.event.workflow_run.html_url }}"
}'
- name: Notify Signal on success
if: ${{ github.event.workflow_run.conclusion == 'success' }}
run: |
curl -sf -X POST "${{ secrets.SIGNAL_ENDPOINT }}/ci" \
-H "Content-Type: application/json" \
-H "X-CI-Secret: ${{ secrets.SIGNAL_API_KEY }}" \
-d '{
"source": "${{ github.repository }}",
"message": "✅ Workflow \"${{ github.event.workflow_run.name }}\" succeeded on ${{ github.event.workflow_run.head_branch }}\n${{ github.event.workflow_run.html_url }}"
}'