-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jacob Shandling
committed
Dec 24, 2024
1 parent
e655e51
commit 9f911a8
Showing
2 changed files
with
75 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Slack notification on error | ||
description: If the job fails, send a summary of errors to the Slack #help-engineering channel | ||
# Schema: https://json.schemastore.org/github-action.json | ||
|
||
# This action expects the following env vars to be set: | ||
# ? | ||
|
||
# inputs: | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Slack Notification | ||
# if: failure() | ||
shell: bash | ||
working-directory: "./" | ||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 | ||
with: | ||
payload: | | ||
{ | ||
"text": "${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head.html_url }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "<Jacobs GH action testing - disregard this notification> ${{ job.name }} - result: ${{ job.status }}\nhttps://github.com/fleetdm/fleet/actions/runs/${{ github.run_id }}\n${{ github.event.pull_request.html_url || github.event.head.html_url }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
JOB_STATUS: ${{ job.status }} | ||
EVENT_URL: ${{ github.event.pull_request.html_url || github.event.head.html_url }} | ||
RUN_URL: https://github.com/fleetdm/fleet/actions/runs/${{ github.run_id }}\n${{ github.event.pull_request.html_url || github.event.head.html_url }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_G_HELP_ENGINEERING_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters