Skip to content

Commit b5bdd24

Browse files
authored
[action] send notification if update container images job failed (#20463)
* [action] send notification if update container images job failed * Update .github/workflows/update-image-digest.yml
1 parent eaf1055 commit b5bdd24

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/update-image-digest.yml

+12
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,15 @@ jobs:
109109
labels: automated pr, kind/cleanup, release-note-none
110110
branch: update-digests
111111
delete-branch: true
112+
113+
- name: Get previous job's status
114+
id: lastrun
115+
uses: filiptronicek/get-last-job-status@main
116+
- name: Slack Notification
117+
if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
118+
uses: rtCamp/action-slack-notify@v2
119+
env:
120+
SLACK_WEBHOOK: ${{ secrets.RELEASE_SLACK_WEBHOOK }}
121+
SLACK_COLOR: ${{ job.status }}
122+
SLACK_TITLE: "Update container images digest"
123+
SLACK_FOOTER: "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow logs>"

0 commit comments

Comments
 (0)