Git Product home page Git Product logo

actions-slack's Introduction

actions-slack

GitHub Actions status GitHub Actions status

You can notify to Slack in GitHub Actions workflow.

Screen Shot 2019-12-19 at 1 06 23 AM

Usage

Simple case

steps:
  - name: Action 1
    uses: ...

  - name: Action 2
    run: ...

  - name: Notify
    uses: innocarpe/actions-slack@v1
    with:
      status: ${{ jobs.<job_id>.status }} # Required
      success_text: 'Step Succeeded ๐Ÿš€' # Optional
      failure_text: 'Step Failed ๐Ÿ˜ฑ' # Optional
      cancelled_text: 'Step Cancelled โš ๏ธ' # Optional
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # Required

Advanced case

You can use slack group mention(@your-group) and github actor/ref and so on.

steps:
  - name: Notify the start
    uses: innocarpe/actions-slack@v1
    with:
      status: ${{ jobs.<job_id>.status }} # Required
      success_text: '<!subteam^S1ABC2DEF> @${{ github.actor }} just started the workflow for `${{ github.ref }}`'
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # Required

  - name: Action 1
    uses: ...

  - name: Action 2
    run: ...
    
  - name: Notify to Slack
    uses: innocarpe/actions-slack@v1
    with:
      status: ${{ jobs.<job_id>.status }} # Required
      success_text: '<!subteam^S1ABC2DEF> The awesome workflow just finished โœ…'
      failure_text: '<!subteam^S1ABC2DEF> The bad workflow failed. Please check the issue below ๐Ÿ‘‡'
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required
      SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # Required

actions-slack's People

Contributors

innocarpe avatar dependabot[bot] avatar systho avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.