Skip to content

Commit 621e469

Browse files
authored
feat: qa slack notification (#3773)
* adds: qa notification job * test it works * adds secret * test * resotore tests
1 parent 0dda719 commit 621e469

File tree

1 file changed

+8
-36
lines changed

1 file changed

+8
-36
lines changed

.github/workflows/nightly-ci.yml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -130,40 +130,12 @@ jobs:
130130
run: |
131131
docker compose -f catalyst-gateway/tests/docker-compose.yml up api-tests-runner --exit-code-from api-tests-runner
132132
133-
slack:
134-
name: slack notification
133+
slack-notification:
135134
needs: tests
136-
runs-on: ubuntu-latest
137-
if: failure()
138-
steps:
139-
- uses: slackapi/[email protected]
140-
with:
141-
payload: |
142-
{
143-
"text": "😭 *Voices Nightly Tests Failed* 😭",
144-
"attachments": [
145-
{
146-
"color": "danger",
147-
"blocks": [
148-
{
149-
"type": "section",
150-
"text": {
151-
"type": "mrkdwn",
152-
"text": "*Workflow:* ${{ github.workflow }} failed on ${{ github.ref_name }}.\n\n*Action Required:* <!channel> please review the logs."
153-
}
154-
},
155-
{
156-
"type": "context",
157-
"elements": [
158-
{
159-
"type": "mrkdwn",
160-
"text": "View Logs: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click here>"
161-
}
162-
]
163-
}
164-
]
165-
}
166-
]
167-
}
168-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
169-
webhook-type: webhook-trigger
135+
if: ${{ always() && needs.tests.result == 'failure' }}
136+
uses: input-output-hk/catalyst-ci/.github/workflows/qa-notify.yml@master
137+
with:
138+
failed_repo: ${{ github.repository }}
139+
failed_run_id: ${{ github.run_id }}
140+
secrets:
141+
slack_webhook: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)