Custom GitHub Action for Elasticsearch Performance team used to send notifications about GitHub Action job status.
The initial version sends notification using Slack. It is based on legacy Slack Incoming Webhooks.
Required inputs:
slack_webhook_url
- Slack Incoming Webhook URLslack_channel
- Slack channel name or IDstatus
- Slack job status description
Example use:
env:
DEFAULT_BRANCH: master
jobs:
<job-id>:
steps:
[..]
- uses: elastic/es-perf-github-status@v1
if: ${{ failure() && ( github.event_name == 'schedule' || ( github.event_name == 'push' && github.ref_name == env.DEFAULT_BRANCH ) ) }}
with:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
slack_channel: ${{ secrets.SLACK_CHANNEL }}
status: FAILED
This version uses Slack app method.
Required inputs:
slack_bot_token
- Slack Bot tokenslack_channel
- Slack channel IDstatus
- Slack job status description
Example use:
env:
DEFAULT_BRANCH: master
jobs:
<job-id>:
steps:
[..]
- uses: elastic/es-perf-github-status@v2
if: ${{ failure() && ( github.event_name == 'schedule' || ( github.event_name == 'push' && github.ref_name == env.DEFAULT_BRANCH ) ) }}
with:
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel: ${{ secrets.SLACK_CHANNEL }}
status: FAILED