Skip to content

Commit 09dead5

Browse files
jonas-wielage-sonarsourcesonartech
authored andcommitted
SONARTEXT-802 Fix slack notification for public and private builds (#1158)
GitOrigin-RevId: f21c8933c74fd2b184252bf5c40466c389fd0c23
1 parent e75ae1d commit 09dead5

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,23 @@ jobs:
5858
gradle-args: "--build-cache -x artifactoryPublish -Dsonar.projectName=SonarText"
5959
disable-caching: true
6060
shadow-scan: ${{ github.event_name == 'schedule' }}
61+
62+
notify_slack:
63+
name: Notify Slack on Failure
64+
needs: [ build ]
65+
if: >-
66+
failure() && ! cancelled() &&
67+
(github.ref_name == github.event.repository.default_branch ||
68+
startsWith(github.ref_name, 'branch-') ||
69+
startsWith(github.ref_name, 'feature/'))
70+
permissions:
71+
id-token: write
72+
statuses: read
73+
runs-on: github-ubuntu-latest-s
74+
steps:
75+
- uses: SonarSource/release-github-actions/notify-slack@v1
76+
with:
77+
project-name: "SonarText - Public"
78+
slack-channel: "squad-security-cloud-notifs"
79+
icon: ':shushing_face:'
80+
jobs: ${{ toJSON(needs) }}

.github/workflows/slack-notify.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)