Home

Awesome

🚀 Slack for GitHub Actions

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

All Contributors

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Build Status stability-frozen No Maintenance Intended

Sends a Slack notification. Simple as that.

Appearance on Slack :

Slack message

This GitHub action is part of a list of Actions that are located in an other repo. Feel free to check it out : https://github.com/Ilshidur/actions.

<hr/>

DEPRECATION NOTICE

Please refer to the following discussion : https://github.com/Ilshidur/action-slack/discussions/255

Usage

- name: Slack notification
  env:
    SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
    SLACK_USERNAME: ThisIsMyUsername # Optional. (defaults to webhook app)
    SLACK_CHANNEL: general # Optional. (defaults to webhook)
    SLACK_AVATAR: repository # Optional. can be (repository, sender, an URL) (defaults to webhook app avatar)
  uses: Ilshidur/action-slack@2.0.2
  with:
    args: 'A new commit has been pushed.' # Optional

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

Arguments

The argument is the message to display in the Slack notification.

Environment variables can be interpolated in the message using brackets ({{ and }}) :

e.g.: Action called : {{ GITHUB_ACTION }}

Note : be careful to properly format your messages for Slack.

Event Payload data can also be interpolated in the message using brackets ({{ and }}) with the EVENT_PAYLOAD variable.

e.g.: Action called: {{ GITHUB_ACTION }} as {{ EVENT_PAYLOAD.pull_request.id }}

See the event types for valid payload informations.

Examples

Environment variables

Debugging / testing / development

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

Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://lion.alia.ml"><img src="https://avatars1.githubusercontent.com/u/12537491?v=4" width="100px;" alt=""/><br /><sub><b>Christhopher Lion</b></sub></a><br /><a href="https://github.com/Ilshidur/action-slack/commits?author=itsmelion" title="Code">💻</a> <a href="#ideas-itsmelion" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/Ilshidur/action-slack/commits?author=itsmelion" title="Documentation">📖</a></td> </tr> </table> <!-- markdownlint-enable --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

Alternatives

Because open source is about everyone :

https://github.com/marketplace/actions/post-slack-message <br/>

https://github.com/marketplace/actions/slack-notify <br/>

https://github.com/marketplace/actions/slack-bot-action <br/>

https://github.com/marketplace/actions/slatify <br/>

https://github.com/marketplace/actions/slack-notify-build <br/>

https://github.com/marketplace/actions/action-slack <br/>

<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-slack/issues/new">Your feedback is appreciated</a> </p>