Skip to content

opspresso/action-slack

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Post Slack

GitHub Actions status GitHub Releases

Usage

name: Post Slack

on: push

jobs:
  slack:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1
        with:
          fetch-depth: 1

      - name: Post to Slack
        uses: opspresso/action-slack@master
        env:
          SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
          JSON_PATH: ./target/slack_message.json

env

Name Description Default Required
SLACK_TOKEN Your Slack WeebHook Token. Yes
JSON_PATH The json file path of the slack message. see Yes

exec

URL="https://hooks.slack.com/services/${SLACK_TOKEN}"
curl \
    -sSL \
    -X POST \
    -H "Content-type: application/json" \
    --data @"${JSON_PATH}"