GitHub Action
blipdrop/nodd-action@v1 sends a notification to an iPhone from GitHub Actions and can wait for approval.
Issue a send key in the app and add it to your repository secrets as NODD_KEY. The runner needs curl and jq.
Send a notification
- uses: blipdrop/nodd-action@v1
with:
key: ${{ secrets.NODD_KEY }}
title: Deployed
body: ${{ github.sha }}
level: low
Wait for approval
With wait: "true", the step asks for approval and waits. It succeeds only when an approval is recorded. Rejection, expiry, cancellation, and failure all fail the job.
- id: approval
uses: blipdrop/nodd-action@v1
with:
key: ${{ secrets.NODD_KEY }}
title: Deploy to production?
level: high
wait: "true"
expires-in: "1800"
- name: Show the rejection reason
if: failure() && steps.approval.outputs.decision == 'rejected'
env:
NOTE: ${{ steps.approval.outputs.note }}
run: echo "$NOTE"
note is text a person wrote, so pass it through env as shown instead of putting it directly in run.
Inputs
key | Required. Send key, passed from secrets and masked in logs |
|---|---|
title | Required. Notification title |
body | Body |
level | low, normal, or high. Default normal |
wait | "true" asks for approval and waits. Default "false" |
expires-in | Response deadline in seconds. Default "3600" |
api-url | API URL. Default https://api.nodd.blipdrop.net |
Outputs
id | Message ID |
|---|---|
decision | approved, rejected, expired, cancelled, or failed. Set only with wait: "true" |
note | The reason the responder wrote, if any. Line breaks become spaces |
Good to know
- It waits until 15 minutes after
expires-in. Set the job'stimeout-minuteslonger than that - There are no inputs for multiple approvers or escalation. Use
nodd askfrom the CLI if you need them - Add
continue-on-error: trueto steps that should not stop the job if a notification fails