Skip to content

Commit db6b38d

Browse files
add hook notification
1 parent 1aa5ba8 commit db6b38d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/test-code-samples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ jobs:
5252
with:
5353
status: ${{ job.status }}
5454
notify_when: "failure"
55-
notification_title: "{workflow} is failing"
55+
notification_title: "Code sample test '{workflow}' is failing"
5656
env:
5757
SLACK_WEBHOOK_URL: ${{ secrets.PRODUCTION_ISSUES_SLACK_HOOK_URL }}

.github/workflows/test-integration.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,14 @@ jobs:
5151
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
5252
run: |
5353
pytest -m integration
54+
55+
56+
- name: Notify Slack Action on Failure
57+
uses: ravsamhq/notify-slack-action@2.3.0
58+
if: ${{ always() && github.ref_name == 'main' }}
59+
with:
60+
status: ${{ job.status }}
61+
notify_when: "failure"
62+
notification_title: "Integration test '{workflow}' is failing"
63+
env:
64+
SLACK_WEBHOOK_URL: ${{ secrets.PRODUCTION_ISSUES_SLACK_HOOK_URL }}

.github/workflows/test-regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
status: ${{ job.status }}
6161
notify_when: "failure"
62-
notification_title: "Regression test workflow {workflow} is failing"
62+
notification_title: "Regression test workflow '{workflow}' is failing"
6363
env:
6464
SLACK_WEBHOOK_URL: ${{ secrets.PRODUCTION_ISSUES_SLACK_HOOK_URL }}
6565
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}

0 commit comments

Comments
 (0)