mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Added Slack failure notification to the new Collect engineering metrics job. (#30566)
Fixes #29140 I intended to add a Slack notification but forgot in the previous PR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added automated Slack notifications for failed scheduled workflow runs. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
502fb0c5cc
commit
82eddfea1e
1 changed files with 21 additions and 0 deletions
21
.github/workflows/collect-eng-metrics.yml
vendored
21
.github/workflows/collect-eng-metrics.yml
vendored
|
|
@ -53,3 +53,24 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SERVICE_ACCOUNT_KEY_PATH: './service-account-key.json'
|
||||
|
||||
- name: Slack notification
|
||||
if: github.event_name == 'schedule' && failure()
|
||||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"text": "${{ job.status }}",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "Collect engineering metrics result: ${{ job.status }}\nhttps://github.com/fleetdm/fleet/actions/runs/${{ github.run_id }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_G_HELP_ENGINEERING_WEBHOOK_URL }}
|
||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||
|
|
|
|||
Loading…
Reference in a new issue