|
48 | 48 | -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes" \ |
49 | 49 | docs/ \ |
50 | 50 | "${VPS_USER}@${VPS_HOST}:/opt/jellyrock/api-docs/" |
| 51 | +
|
| 52 | + # Deploy heartbeat (ADR-0005). Values passed via env, never inlined into |
| 53 | + # the script, to avoid commit-message shell injection. No-op until the |
| 54 | + # GOTIFY_URL secret is set. |
| 55 | + - name: Notify Gotify on success |
| 56 | + if: success() |
| 57 | + env: |
| 58 | + GOTIFY_URL: ${{ secrets.GOTIFY_URL }} |
| 59 | + REPO: ${{ github.event.repository.name }} |
| 60 | + COMMIT_MSG: ${{ github.event.head_commit.message }} |
| 61 | + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 62 | + run: | |
| 63 | + [ -z "$GOTIFY_URL" ] && { echo "GOTIFY_URL unset — skipping"; exit 0; } |
| 64 | + curl -fsS -m 10 "$GOTIFY_URL" \ |
| 65 | + -F "priority=3" \ |
| 66 | + -F "title=${REPO} deploy ok" \ |
| 67 | + -F "message=Commit: ${COMMIT_MSG} |
| 68 | + Run: ${RUN_URL}" || true |
| 69 | +
|
| 70 | + - name: Notify Gotify on failure |
| 71 | + if: failure() |
| 72 | + env: |
| 73 | + GOTIFY_URL: ${{ secrets.GOTIFY_URL }} |
| 74 | + REPO: ${{ github.event.repository.name }} |
| 75 | + COMMIT_MSG: ${{ github.event.head_commit.message }} |
| 76 | + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
| 77 | + run: | |
| 78 | + [ -z "$GOTIFY_URL" ] && exit 0 |
| 79 | + curl -fsS -m 10 "$GOTIFY_URL" \ |
| 80 | + -F "priority=8" \ |
| 81 | + -F "title=${REPO} deploy FAILED" \ |
| 82 | + -F "message=Commit: ${COMMIT_MSG} |
| 83 | + Run: ${RUN_URL}" || true |
0 commit comments