Push notifications from GitHub Actions
Stop refreshing the Actions tab. Add one curl step to any workflow and Pling pushes the build result straight to your iPhone, with a tappable link back to the run. There is no Marketplace action to trust and no runner plugin to install, just the Pling HTTP API.
The one step you need
Add your token as a repository secret named PLING_TOKEN (Settings → Secrets and variables → Actions), then drop this step into any job:
- name: Notify my phone
run: |
curl -sf -X POST https://api.plingpush.com/api/push \
-H "Content-Type: application/json" \
-d '{"token":"${{ secrets.PLING_TOKEN }}","title":"Deploy succeeded","message":"${{ github.repository }} on ${{ github.ref_name }}","channel":"ci","priority":"normal"}'
Notify only when something breaks
Most of the time you only care about red builds. The if: failure() conditional runs the step solely when an earlier step in the job failed:
- name: Push on failure
if: failure()
run: |
curl -sf -X POST https://api.plingpush.com/api/push \
-H "Content-Type: application/json" \
-d '{"token":"${{ secrets.PLING_TOKEN }}","title":"CI failed","message":"${{ github.workflow }} on ${{ github.ref_name }}","priority":"high"}'
Report every result, with a link back
Use if: always() so the step runs whether the job passed or failed, and pass ${{ job.status }} plus a tappable url back to the run:
- name: Push build result
if: always()
run: |
curl -sf -X POST https://api.plingpush.com/api/push \
-H "Content-Type: application/json" \
-d "{\"token\":\"${{ secrets.PLING_TOKEN }}\",\"title\":\"CI ${{ job.status }}\",\"message\":\"${{ github.workflow }} on ${{ github.ref_name }}\",\"priority\":\"high\",\"url\":\"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}"
Tap the notification on your phone and it opens the exact run on GitHub. Group your CI alerts with the channel field so they stay separate from your other pushes.
Frequently asked
Do I need a GitHub Marketplace action?
No. Pling is a plain HTTP endpoint, so a single curl step is all you need. That means no third-party action in your supply chain and nothing to keep updated.
How do I notify only when the build fails?
Add if: failure() to the notify step. GitHub only runs it when an earlier step in the job failed, so you get a push for red builds and silence for green ones.
Can the push link back to the workflow run?
Yes. Set the url field to ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} and the notification becomes tappable, opening the run on GitHub.
Will my token leak in the logs?
Store it as the PLING_TOKEN repository secret. GitHub masks secrets in logs automatically, and the value never appears in your workflow file.
More recipes: Cron jobs · Python · full API reference