Fix ci slack notifications (only on main, not all branches) (#397)
Only notify #ci on Slack for 'main' branch. Add token so workflow links work. From https://github.com/ravsamhq/notify-slack-action#readme: > In order to use {workflow_url}, specify the token input as token: ${{ secrets.GITHUB_TOKEN }}.
This commit is contained in:
parent
e47fe2484e
commit
6f8c71ff5d
|
@ -42,8 +42,9 @@ jobs:
|
|||
- name: Run all tests
|
||||
run: script/ci
|
||||
- uses: ravsamhq/notify-slack-action@v1
|
||||
if: always()
|
||||
if: github.ref_name == 'main'
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: ${{ job.status }}
|
||||
notification_title: '{workflow} has {status_message}'
|
||||
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>'
|
||||
|
|
Loading…
Reference in New Issue