From 67895bff13412c17417751d723fd7c7a40a8e6a3 Mon Sep 17 00:00:00 2001 From: iQQBot Date: Wed, 18 Dec 2024 08:21:39 +0000 Subject: [PATCH 1/2] [action] send notification 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: "" From 94bf04dab6da95e66107507f9caa1dc3ee7942aa Mon Sep 17 00:00:00 2001 From: iQQBot Date: Thu, 19 Dec 2024 15:52:10 +0800 Subject: [PATCH 2/2] Update .github/workflows/update-image-digest.yml --- .github/workflows/update-image-digest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-image-digest.yml b/.github/workflows/update-image-digest.yml index 873c7d2251e6ca..c13cee85ff418a 100644 --- a/.github/workflows/update-image-digest.yml +++ b/.github/workflows/update-image-digest.yml @@ -117,7 +117,7 @@ jobs: if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }} uses: rtCamp/action-slack-notify@v2 env: - SLACK_WEBHOOK: ${{ secrets.WORKSPACE_SLACK_WEBHOOK }} + SLACK_WEBHOOK: ${{ secrets.RELEASE_SLACK_WEBHOOK }} SLACK_COLOR: ${{ job.status }} SLACK_TITLE: "Update container images digest" SLACK_FOOTER: ""