GitHub Action
GitHub Action for Mercure
1.1.0
Latest version
Send a Mercure publish event. Simple as that.
- 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.
- name: Publish notification
env:
MERCURE_HUB_URL: ${{ secrets.MERCURE_HUB_URL }}
MERCURE_HUB_JWT: ${{ secrets.MERCURE_HUB_JWT }}
MERCURE_TOPICS: topic1,topic2
uses: Ilshidur/action-mercure@master
with:
args: '{ \"hello\": \"world\" }'
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@6265c17"
(=> link to the commits list : https://github.com/Ilshidur/action-mercure/commits/master)
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 }}\" }"
MERCURE_TOPICS
: the Mercure topics. Supports interpolation using ({{
and}}
).
MERCURE_HUB_URL
: the public Mercure hub URL (required).MERCURE_HUB_JWT
: the publisher JWT (required).- That's all.
GNU GENERAL PUBLIC LICENSE v3.
Don't forget to ๐ Star ๐ the repo if you like this GitHub Action !
Your feedback is appreciated