Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 681 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 681 Bytes

Add slack-message to Github Workflows

Usage

- uses: valu-digital/slack-action@master
  with:
      token: ${{ secrets.SLACK_TOKEN }}
      # or
      #webhook: ${{ secrets.SLACK_WEBHOOK }}
      channel: "#channel" # Channel to send the messages to

This puts the slack-message command to the PATH in your Github Workflows and allows which can be used from any steps.

Example:

- name: Build and deploy
  run: |
        slack-message "Starting deploy"

        npm ci
        npm run deploy

        slack-message "App deployed"

Failure notifications

- name: Notify about failure
  if: failure()
  run: slack-message "Deploy failed"