Coder Social home page Coder Social logo

datable-inc / slack-workflow-status Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gamesight/slack-workflow-status

0.0 0.0 0.0 1.15 MB

Github action for sending workflow run results to Slack

Home Page: https://gamesight.io

License: MIT License

TypeScript 100.00%

slack-workflow-status's Introduction

Slack Workflow Status

This action will post workflow status notifications into your Slack channel. The notification includes the name of the Actor, Event, Branch, Workflow Name, Status and Run Durations. This action can optionally include the status and duration of individual jobs in a workflow to quickly help you identify where failures and slowdowns occur.

Action Inputs

Name Required Description
slack_webhook_url required Create a Slack Webhook URL using the Incoming Webhooks App. It is recommended that you create a new secret on your repo SLACK_WEBHOOK_URL for holding this value, and passing it to the action with ${{secrets.SLACK_WEBHOOK_URL}}.
repo_token required A token is automatically available in your workflow secrets var. ${{secrets.GITHUB_TOKEN}}. You can optionally send an alternative self-generated token.
include_jobs optional When set to true, include individual job status and durations in the slack notification. When false only the event status and workflow status lines are included. When set to on-failure โ€” individual job status is reported only if workflow failed. Default is true.
include_commit_message optional When set to true, include the workflow head commit message title in the slack notification. Default is false.
channel optional Accepts a Slack channel name where you would like the notifications to appear. Overrides the default channel created with your webhook.
name optional Allows you to provide a name for the slack bot user posting the notifications. Overrides the default name created with your webhook.
icon_emoji optional Allows you to provide an emoji as the slack bot user image when posting notifications. Overrides the default image created with your webhook. Emoji Code Cheat Sheet
icon_url optional Allows you to provide a URL for an image to use as the slack bot user image when posting notifications. Overrides the default image created with your webhook.

Usage

To use this action properly, you should create a new job at the end of your workflow that needs all other jobs in the workflow. This ensures that this action is only run once all jobs in your workflow are complete.

name: World Greeter
on:
  push:
    branches: [ master, staging ]
jobs:
  job-1:
    runs-on: ubuntu-latest
    steps:
      - name: Say Hello
        run: echo "Hello"
  job-2:
    runs-on: ubuntu-latest
    steps:
      - name: Say World
        run: echo "World"
  slack-workflow-status:
    if: always()
    name: Post Workflow Status To Slack
    needs:
      - job-1
      - job-2
    runs-on: ubuntu-latest
    steps:
      - name: Slack Workflow Notification
        uses: Gamesight/slack-workflow-status@master
        with:
          # Required Input
          repo_token: ${{secrets.GITHUB_TOKEN}}
          slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
          # Optional Input
          channel: '#anthony-test-channel'
          name: 'Anthony Workflow Bot'
          icon_emoji: ':poop:'
          icon_url: 'https://avatars0.githubusercontent.com/u/1701160?s=96&v=4'

This action can also be used for Pull Request workflows and will include pull request information in the notification.

developed and maintained by: gamesight.io

slack-workflow-status's People

Contributors

anthonykinson avatar d-seion avatar dcelasun avatar dependabot[bot] avatar nmalaguti avatar ojab avatar rsyvarth avatar sampo02 avatar sjohnr 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.