This actions post messages to Mattermost through a WebHook URL.
Mattermost URL to respond to messages
ID of the canal to send message to. Retrieve it in the info dropdown of the canal. By default it points to
platform-changes mattermost channel that has id nma3kq5wwtfxpfac55mag397cr.
Bot access token for authentication
Thread ID (post ID) to reply to
If set to true it should send message as an attachement in mattermost
Required URL of the Mattermost WebHook to post message to.
Required Text message that should be posted.
Title of the posted message.
Hexa value of the color to use. Fallback to #47ba04 (green).
If thread-id and bot-token are defined it will send a response message in the thread as the user represented by the
bot-token.
Otherwise, if webhook-url is defined it will send the message to that channel with the webhook and the associated
user.
- uses: SekoiaLab/github-actions-mattermost-post@v1
with:
webhook-url: 'https://mattermost/hooks/xxxx'
text: 'GitHub Actions **failed to deploy** `${{ github.event.deployment.payload.microservices }}` (`${{ github.event.deployment.payload.release_id }}`) on production. [Click here to see the full log](https://github.com/SekoiaLab/platform/actions/runs/${{ github.run_id }}).'
color: '#ea0b06'
- uses: SekoiaLab/github-actions-mattermost-post@v3
with:
webhook-url: 'https://mattermost/hooks/xxxx'
text: message sent to mattermost
color: '#ea0b06'
- uses: SekoiaLab/github-actions-mattermost-post@v3
with:
thread-id: <id of thread to respond to>
bot-token: ${secrets.MATTERMOST_PIERRE_BOT_TOKEN}
text: message sent to mattermostGitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules.
Actions are run from GitHub repos. Packaging the action will create a packaged action in the dist folder.
Run prepare
export NODE_OPTIONS=--openssl-legacy-provider
npm run prepareSince the packaged index.js is run from the dist folder.
git add -f dist