From bd1eb6ee3c9438cf89c1f71dd9da07df60411027 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Mon, 2 Mar 2026 12:07:28 +0100 Subject: [PATCH 1/3] ci(ubi-rust-builder): Send notifications on rerun of failed workflows --- .github/workflows/ubi-rust-builder.yml | 48 ++++++-------------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ubi-rust-builder.yml b/.github/workflows/ubi-rust-builder.yml index 59fa73875..ebfcf35e1 100644 --- a/.github/workflows/ubi-rust-builder.yml +++ b/.github/workflows/ubi-rust-builder.yml @@ -66,8 +66,8 @@ jobs: # Uses the keyless signing flow with Github Actions as identity provider cosign sign -y "oci.stackable.tech/sdp/${{ matrix.ubi-version }}-rust-builder@$DIGEST" - create_manifest: - name: Create and Push Image Index Manifest + publish_manifests: + name: Build/Publish Image Index Manifest needs: ["build"] permissions: id-token: write @@ -108,41 +108,15 @@ jobs: notify: name: Failure Notification - needs: [build, create_manifest] + needs: [build, publish_manifests] runs-on: ubuntu-latest - if: failure() + if: failure() || (github.run_attempt > 1 && !cancelled()) steps: - - uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 + - name: Send Notification + uses: stackabletech/actions/send-slack-notification@c34dbb4f27b274736c7d2edc6f6f30a03d03edf5 # v0.12.2 with: - channel-id: "C07UG6JH44F" # notifications-container-images - payload: | - { - "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})", - "attachments": [ - { - "pretext": "See the details below for a summary of which job(s) failed.", - "color": "#aa0000", - "fields": [ - { - "title": "Build", - "short": true, - "value": "${{ needs.build.result }}" - }, - { - "title": "Create Manifest", - "short": true, - "value": "${{ needs.create_manifest.result }}" - } - ], - "actions": [ - { - "type": "button", - "text": "Go to workflow run", - "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}" - } - ] - } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + publish-manifests-result: ${{ needs.publish_manifests.result }} + build-result: ${{ needs.build.result }} + slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }} + channel-id: C07UG6JH44F # notifications-container-images + type: container-image-build From a3f279ffeb5a7fa3b1f24d91b8dcde880156d4ea Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Mon, 2 Mar 2026 12:15:52 +0100 Subject: [PATCH 2/3] chore(ubi-rust-builder): Fail on purpose to test notification --- .github/workflows/ubi-rust-builder.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ubi-rust-builder.yml b/.github/workflows/ubi-rust-builder.yml index ebfcf35e1..59a3c5798 100644 --- a/.github/workflows/ubi-rust-builder.yml +++ b/.github/workflows/ubi-rust-builder.yml @@ -106,6 +106,10 @@ jobs: # Uses the keyless signing flow with Github Actions as identity provider cosign sign -y "$MANIFEST_LIST_NAME@$DIGEST" + - name: Fail on purpose + shell: bash + run: 'false' + notify: name: Failure Notification needs: [build, publish_manifests] From 044534a4c507c1b1e4845d5005eefbe8ae9620e3 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Mon, 2 Mar 2026 12:22:22 +0100 Subject: [PATCH 3/3] Revert "chore(ubi-rust-builder): Fail on purpose to test notification" This reverts commit a3f279ffeb5a7fa3b1f24d91b8dcde880156d4ea. --- .github/workflows/ubi-rust-builder.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ubi-rust-builder.yml b/.github/workflows/ubi-rust-builder.yml index 59a3c5798..ebfcf35e1 100644 --- a/.github/workflows/ubi-rust-builder.yml +++ b/.github/workflows/ubi-rust-builder.yml @@ -106,10 +106,6 @@ jobs: # Uses the keyless signing flow with Github Actions as identity provider cosign sign -y "$MANIFEST_LIST_NAME@$DIGEST" - - name: Fail on purpose - shell: bash - run: 'false' - notify: name: Failure Notification needs: [build, publish_manifests]