Send job results on Slack via Incoming Webhooks
ACTION_NAME
: Name of the action for a more descriptive message.JOB
: JSON-stringifiedjob
variable (see context). Must be passed to output the actual status of the job.SLACK_WEBHOOK_URL
: URL of the Incoming Webhook provided by Slack". Read Sending messages using Incoming Webhooks to configure Slack.
on: push
name: Test something
jobs:
build:
name: Run scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: npm test
- run: npm ci
- uses: pioug/le-slack-message@v1.0.0
with:
ACTION_NAME: Run test scripts
JOB: ${{ toJson(job) }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}