Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Commit 61977e7

Browse files
authored
add failure catch to bottom of the workflow
This sends failure information to a slack channel
1 parent aa89f2f commit 61977e7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/docker-build-push-dockerhub.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,14 @@ jobs:
197197
- name: Cleanup
198198
run: |
199199
docker compose down
200+
201+
- name: Notify Slack on Failure
202+
if: failure()
203+
uses: slackapi/slack-github-action@v1.24.0
204+
with:
205+
payload: |
206+
{
207+
"text": ":x: Workflow *${{ github.workflow }}* failed in job *${{ github.job }}*.\nSee: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
208+
}
209+
env:
210+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)