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

keyRequired. Send key, passed from secrets and masked in logs
titleRequired. Notification title
bodyBody
levellow, normal, or high. Default normal
wait"true" asks for approval and waits. Default "false"
expires-inResponse deadline in seconds. Default "3600"
api-urlAPI URL. Default https://api.nodd.blipdrop.net

Outputs

idMessage ID
decisionapproved, rejected, expired, cancelled, or failed. Set only with wait: "true"
noteThe reason the responder wrote, if any. Line breaks become spaces

Good to know