chore: only notify about CI failure on main if required job fails (#16114)

This should be the last PR to get this working

Looks like the `nightly-gauntlet` is working as expected, and this is a
clone of that.

---------

Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
Danny Kopping
2025-01-13 14:06:43 +00:00
committed by GitHub
parent 24dd8a17d3
commit 22236f2988
2 changed files with 3 additions and 9 deletions
+3 -5
View File
@@ -1252,8 +1252,10 @@ jobs:
make sqlc-vet
notify-slack-on-failure:
needs:
- required
runs-on: ubuntu-latest
if: always() && failure() && github.ref == 'refs/heads/main'
if: failure() && github.ref == 'refs/heads/main'
steps:
- name: Send Slack notification
@@ -1276,10 +1278,6 @@ jobs:
"type": "mrkdwn",
"text": "*Workflow:*\n${{ github.workflow }}"
},
{
"type": "mrkdwn",
"text": "*Failed Job:*\n${{ github.job }}"
},
{
"type": "mrkdwn",
"text": "*Committer:*\n${{ github.actor }}"
-4
View File
@@ -101,10 +101,6 @@ jobs:
"type": "mrkdwn",
"text": "*Workflow:*\n${{ github.workflow }}"
},
{
"type": "mrkdwn",
"text": "*Failed Job:*\n${{ github.job }}"
},
{
"type": "mrkdwn",
"text": "*Committer:*\n${{ github.actor }}"