From f3c38f72b85de21b9cb1a5658f91af610b29d84f Mon Sep 17 00:00:00 2001 From: Mary Georgiou Date: Wed, 30 Sep 2026 13:29:21 +0200 Subject: [PATCH 1/2] CLP-1045: Use the shared slack-notify action Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 774a271..662f8c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,3 +51,25 @@ jobs: - uses: SonarSource/ci-github-actions/promote@v1 with: promote-pull-request: true + + notify-build-failure: + name: Notify build failure + needs: + - build + - promote + if: >- + always() + && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/branch-') || startsWith(github.ref, 'refs/heads/dogfood-')) + && contains(needs.*.result, 'failure') + runs-on: github-ubuntu-latest-s # Public repo - use custom GitHub-hosted runner + permissions: + actions: read + id-token: write # required for vault-action-wrapper in the shared slack-notify action + steps: + - name: Slack Notification + uses: SonarSource/core-languages-tooling-public/common-actions/slack-notify@v1 + with: + slack-channel: squad-corelang-notifs + branch-patterns: 'master,branch-*,dogfood-*' + github-token: ${{ github.token }} + branch: ${{ github.ref_name }} From 28b2029b9ff35bca64e3ef30f7c21fb8c3999d73 Mon Sep 17 00:00:00 2001 From: Mary Georgiou Date: Wed, 30 Sep 2026 14:27:26 +0200 Subject: [PATCH 2/2] Use github.event.repository.default_branch instead of hardcoded master Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 662f8c3..40104dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,6 +70,6 @@ jobs: uses: SonarSource/core-languages-tooling-public/common-actions/slack-notify@v1 with: slack-channel: squad-corelang-notifs - branch-patterns: 'master,branch-*,dogfood-*' + branch-patterns: ${{ format('{0},branch-*,dogfood-*', github.event.repository.default_branch) }} github-token: ${{ github.token }} branch: ${{ github.ref_name }}