π GitHub Action for Mercure
Send a Mercure publish event. Simple as that.
Demo
- Go to https://demo.mercure.rocks, in the Subscribe section.
- Subscribe for notifications on this topic :
foo
. - π Star π this repo !
- Quickly switch to the Mercure demo page to see a notification in your browser.
Usage
action "Publish notification" {
uses = "Ilshidur/action-mercure@master"
secrets = ["MERCURE_HUB_URL", "MERCURE_HUB_JWT"]
args = "{ \"hello\": \"world\" }"
}
NOTICE : for stability purposes, it is recommended to use the action with an explicit commit SHA-1 :
uses = "Ilshidur/action-mercure@eea8db9"
(=> link to the commits list : https://github.com/Ilshidur/action-mercure/commits/master)
Arguments
The argument is the content of the event to send. It is RECOMMENDED to use JSON.
Environment variables can be interpolated in the message using brackets ({{
and }}
) :
e.g.: args = "{ \"action\": \"{{ GITHUB_ACTION }}\" }"
Environment variables
MERCURE_TOPICS
: the Mercure topics. Supports interpolation using ({{
and}}
).
Secrets
MERCURE_HUB_URL
: the public Mercure hub URL (required).MERCURE_HUB_JWT
: the publisher JWT (required).- That's all.
License
GNU GENERAL PUBLIC LICENSE v3.
Don't forget to π Star π the repo if you like this GitHub Action !
Your feedback is appreciated