Coder Social home page Coder Social logo

martinnormark / gitactions-slack-notification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bryannice/gitactions-slack-notification

0.0 1.0 0.0 8.9 MB

Git Action Slack Notifications From Build Status

License: GNU General Public License v3.0

Makefile 37.25% Go 48.55% Dockerfile 14.20%

gitactions-slack-notification's Introduction

Slack Notification

Git Action to send messages to Slack. This action can be used to send message about the status of a Git Action workflow.

Usage

This action can be used after any other action. Below is simple example on using it:

1. Create a .github/workflows/slack-notification.yml

2. Add the following properties to slack-notification.yml file

on: push
name: Slack Notification Demo
jobs:
    slackNotification:
      name: Slack Notification Demo
      runs-on: ubuntu-latest
      steps:
      - uses: actions/checkout@master
      - name: Slack Notification Demo
        uses: bryannice/[email protected]
        env:
          SLACK_INCOMING_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK }}
          SLACK_MESSAGE: 'Demo''ing the Slack Notification'
          SLACK_TITLE: 'Slack Notification Demo'

Go here for a template yml with all environment variables.

3. Generate Slack WebHook here

4. Encrypt Slack Webhook as a secret in the repo using this app.

Environment Variables

These are the environment variables that can be set to pass in additional information about the Git Action.

Variable Name Reguired Description
GITHUB_ACTOR No GitHub Actor variable passed from Git Actions.
GITHUB_ACTION No GitHub Action name variable passed from Git Actions.
GITHUB_EVENT_NAME No GitHub Action event name variable passed from Git Actions.
GITHUB_REF No GitHub reference variable passed from Git Actions.
GITHUB_REPOSITORY No GitHub Repository variable passed from Git Actions.
GITHUB_WORKFLOW No GitHub Action workflow varaible passed from Git Actions.
SLACK_CHANNEL No The Slack channel to use instead of the default.
SLACK_COLOR No Format color to use for the Slack message.
SLACK_ICON No The Slack user icon to use instead of the default.
SLACK_INCOMING_WEBHOOK Yes The Webhook URL generated by Slack to send messages too.
SLACK_MESSAGE Yes The message payload to be sent to Slack.
SLACK_USERNAME No The Slack username to use instead of the default.
SLACK_TITLE Yes Title of the Slack message being sent.

Reference

License

GPLv3

gitactions-slack-notification's People

Contributors

bryan-nice avatar martinnormark avatar

Watchers

 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.