From 2e69a1213a1db8c7ee4a60ba271bd2b729c59400 Mon Sep 17 00:00:00 2001 From: iQQBot Date: Wed, 18 Dec 2024 08:20:39 +0000 Subject: [PATCH] [action] send notificatioin if update container images job failed --- .github/workflows/update-image-digest.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/update-image-digest.yml b/.github/workflows/update-image-digest.yml index 0731770f8c6bf6..873c7d2251e6ca 100644 --- a/.github/workflows/update-image-digest.yml +++ b/.github/workflows/update-image-digest.yml @@ -109,3 +109,15 @@ jobs: labels: automated pr, kind/cleanup, release-note-none branch: update-digests delete-branch: true + + - name: Get previous job's status + id: lastrun + uses: filiptronicek/get-last-job-status@main + - name: Slack Notification + if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.WORKSPACE_SLACK_WEBHOOK }} + SLACK_COLOR: ${{ job.status }} + SLACK_TITLE: "Update container images digest" + SLACK_FOOTER: ""