Send GitHub Action workflow notifications to ntfy.
Find a file
2026-02-02 15:24:20 +00:00
.github chore: update dependabot.yml 2024-01-02 17:04:00 +05:30
dist fix: update ESLint config, enhance error handling, and bump version 2025-06-04 13:40:48 +04:00
src fix: update ESLint config, enhance error handling, and bump version 2025-06-04 13:40:48 +04:00
.gitattributes Initial commit 2022-07-02 13:25:26 +05:30
.gitignore Initial commit 2022-07-02 13:25:26 +05:30
action.yml feat: custom action buttons, notification icon, and image attachment 2024-01-02 13:04:15 +05:30
eslint.config.cjs fix: update ESLint config, enhance error handling, and bump version 2025-06-04 13:40:48 +04:00
index.test.js Initial commit 2022-07-02 13:25:26 +05:30
LICENSE Initial commit 2022-07-02 13:25:26 +05:30
package-lock.json chore(deps): bump axios from 1.13.1 to 1.13.3 2026-02-01 06:41:09 +00:00
package.json chore(deps): bump axios from 1.13.1 to 1.13.3 2026-02-01 06:41:09 +00:00
README.md Add default messages to documentation 2024-10-14 12:07:07 +02:00

ntfy action

Send GitHub action notifications to ntfy.sh.

This is currently only available for push, release, schedule, workflow, repository_dispatch and workflow_dispatch events. This action will send a default message wich can be extended with your input details.

Forked from Form_Data_HTTP_POST_Action.

Inputs

Input Required Description Example
url Yes ntfy URL www.ntfy.sh
topic Yes ntfy topic test
tags No Tags for the message seperated by commas partying_face,+1
title No Message title GitHub. Default is GitHub Actions.
priority No Message priority 5. Default is 3.
details No Additional text after the notification message. Workflow has failed!. Default is None.
headers No Additional Headers {"authorization": "Basic 123456"}
actions No Custom action buttons [{"action": "view","label": "Open portal","url": "https://home.nest.com/"}, {action 2}]. Default is disabled. Available values: disabled, default or JSON array of buttons.
icon No An icon that will appear next to the text of the notification https://example.com/example.png
image No An image of your workflow page. Default is false Available values: true, false.

Tip

If you are using CloudFlare infront of your ntfy server, you should turn off Bot Fight Mode in Security->Bots. Otherwise you probably will get 503 status.

Note

The image taken is uploaded to nokonoko/uguu's official server.

Example Usage

- name: ntfy-notifications
  uses: niniyas/ntfy-action@master
  with:
    url: 'https://ntfy.sh' or '${{ secrets.NTFY_URL }}'
    topic: 'test' or '${{ secrets.NTFY_TOPIC }}'

Send with headers

- name: ntfy-notifications
  uses: niniyas/ntfy-action@master
  with:
    url: 'https://ntfy.sh' or '${{ secrets.NTFY_URL }}'
    topic: 'test' or '${{ secrets.NTFY_TOPIC }}'
    headers: '{"authorization": "Basic 123456", "another-one": "Basic 123456"}' or '${{ secrets.NTFY_HEADERS }}'

Send with tags, priority and details

Success

- name: ntfy-success-notifications
  uses: niniyas/ntfy-action@master
  if: success()
  with:
    url: 'https://ntfy.sh' or '${{ secrets.NTFY_URL }}'
    topic: 'test' or '${{ secrets.NTFY_TOPIC }}'
    priority: 4
    headers: '{"authorization": "Basic 123456", "another-one": "Basic 123456"}' or '${{ secrets.NTFY_HEADERS }}'
    tags: +1,partying_face,action,successfully,completed
    details: Workflow has been successfully completed!
    icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png'
    image: true

Failed

- name: ntfy-failed-notifications
  uses: niniyas/ntfy-action@master
  if: failure()
  with:
    url: 'https://ntfy.sh' or '${{ secrets.NTFY_URL }}'
    topic: 'test' or '${{ secrets.NTFY_TOPIC }}'
    priority: 5
    headers: '{"authorization": "Basic 123456", "another-one": "Basic 123456"}' or '${{ secrets.NTFY_HEADERS }}'
    tags: +1,partying_face,action,failed
    details: Workflow has failed!
    actions: 'default'

Cancelled

- name: ntfy-cancelled-notifications
  uses: niniyas/ntfy-action@master
  if: cancelled()
  with:
    url: 'https://ntfy.sh' or '${{ secrets.NTFY_URL }}'
    topic: 'test' or '${{ secrets.NTFY_TOPIC }}'
    priority: 3
    headers: '{"authorization": "Basic 123456", "another-one": "Basic 123456"}' or '${{ secrets.NTFY_HEADERS }}'
    tags: +1,partying_face,action,cancelled
    details: Workflow has been cancelled!
    actions: '[{"action": "view", "label": "Open portal", "url": "https://home.nest.com/", "clear": true}]'

Default messages

push

`Author: ${payload.head_commit.author.username}\n` +
`Committer: ${payload.head_commit.committer.name}\n` +
`Ref: ${context.ref}\n` +
`Pushed by: ${payload.pusher.name}\n` +
`Workflow Job Name: ${context.job}\n` +
`Workflow Name: ${context.workflow}\n\n` +
`Commit Message\n${payload.head_commit.message}`

release

`${payload.release.author.login} has ${payload.action} $
{payload.release.tag_name} on ${payload.repository.full_name}.
\n\n` +
`Repo: ${payload.repository.html_url}\n` +
`Name: ${payload.release.name}\n` +
`Author: ${payload.release.author.login}\n` +
`Prerelease: ${payload.release.prerelease}\n` +
`Workflow Job Name: ${context.job}\n` +
`Workflow Name: ${context.workflow}\n\n` +
`Release Message\n${payload.release.body}`;

schedule

`Scheduled task '${context.job}' has been executed in ${process.
env.GITHUB_REPOSITORY}.\n\n` +
`Workflow Name: ${context.workflow}\n` +
`Cron: ${payload.schedule}`;

workflow, repository_dispatch, workflow_dispatch, default

`Workflow '${context.workflow}' has been executed in ${payload.
repository.full_name}\n\n` +
`Repository: ${payload.repository.full_name}\n` +
`Workflow Job Name: ${context.job}\n` +
`Event Name: ${context.eventName}`;