Home

Awesome

🚀 GitHub Action for Mercure

GitHubActions Build Status

Send a Mercure publish event. Simple as that.

GitHub Action

Compatibility note

As this Action is containerized with Docker, it can only run on Linux environments.

Docker container actions can only execute in the GitHub-hosted Linux environment.

Self-hosted runners must use a Linux operating system and have Docker installed to run Docker container actions. For more information about the requirements of self-hosted runners, see "About self-hosted runners."

<hr/>

Demo

  1. Go to https://demo.mercure.rocks, in the Subscribe section.
  2. Subscribe for notifications on this topic : foo.
  3. 🌟 Star 🌟 this repo !
  4. Quickly switch to the Mercure demo page to see a notification in your browser.

Usage

- name: Publish notification
 env:
   MERCURE_HUB_URL: ${{ secrets.MERCURE_HUB_URL }}
   MERCURE_HUB_JWT: ${{ secrets.MERCURE_HUB_JWT }}
   MERCURE_TOPICS: topic1,topic2
   MERCURE_TYPE: message
   MERCURE_PRIVATE: on
 uses: Ilshidur/action-mercure@master
 with:
   args: '{ \"hello\": \"world\" }'

NOTICE : for stability purposes, it is recommended to use the action with an explicit commit SHA-1 :

uses = "Ilshidur/action-mercure@c80298a8875d00ecc2d1e4cf07e205866251628c" (=> 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

Secrets

Debugging / testing / development

Developers, all you need is in the DEVELOPMENT.md file.

License

GNU GENERAL PUBLIC LICENSE v3.

<hr/> <p align="center"> Don't forget to 🌟 Star 🌟 the repo if you like this GitHub Action !<br/> <a href="https://github.com/Ilshidur/action-mercure/issues/new">Your feedback is appreciated</a> </p>