File tree Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 6
6
- master
7
7
- ' dogfood/**'
8
8
9
- env :
10
- SLACK_USERNAME : Dogfood build action
11
-
12
9
jobs :
13
10
dogfood_merge :
14
11
runs-on : ubuntu-latest
21
18
uses : SonarSource/vault-action-wrapper@dc8fe04652687f7278f3ecd27905967836bab0eb # tag=2.7.4-1
22
19
with :
23
20
secrets : |
24
- development/kv/data/slack webhook | SLACK_WEBHOOK;
25
21
development/github/token/{REPO_OWNER_NAME_DASH}-dogfood-merge token | dogfood_token;
26
22
- name : git octopus step
27
23
env :
@@ -33,13 +29,12 @@ jobs:
33
29
# Use the output from the `dogfood` step
34
30
- name : Get the name of the dogfood branch and its HEAD SHA1
35
31
run : echo "The dogfood branch was `${{ steps.dogfood.outputs.dogfood-branch }}` and its HEAD SHA1 was `${{ steps.dogfood.outputs.sha1 }}`"
36
- # slack notifications
32
+ # Notify on Slack
37
33
- name : Notify failures on Slack
38
34
if : failure()
39
- uses : 8398a7/action-slack@v3
40
- with :
41
- status : failure
42
- fields : repo,author,eventName
43
- channel : ' #squad-jvm-kotlin'
35
+ uses : slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
44
36
env :
45
- SLACK_WEBHOOK_URL : ${{ fromJSON(steps.secrets.outputs.vault).SLACK_WEBHOOK }}
37
+ SLACK_BOT_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).SLACK_BOT_TOKEN }}
38
+ with :
39
+ channel-id : squad-jvm-notifs
40
+ slack-message : " Dogfood build for `${{ steps.dogfood.outputs.sha1 }}`: *failed*, see the logs at https://github.com/SonarSource/sonar-kotlin/actions/workflows/dogfood.yml"
Original file line number Diff line number Diff line change 16
16
with :
17
17
publishToBinaries : true
18
18
mavenCentralSync : true
19
- slackChannel : squad-jvm-kotlin
19
+ slackChannel : squad-jvm-notifs
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Slack Notifications
3
+ on :
4
+ check_run :
5
+ types : [rerequested, completed]
6
+
7
+ jobs :
8
+ slack-notifications :
9
+ permissions :
10
+ id-token : write # to authenticate via OIDC
11
+ uses : SonarSource/gh-action_build-notify/.github/workflows/main.yaml@v1
12
+ with :
13
+ slackChannel : squad-jvm-notifs
You can’t perform that action at this time.
0 commit comments