Skip to content

Commit fcf1668

Browse files
committed
github: migrate slack notify to official action
1 parent 4857fbd commit fcf1668

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/.notify.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,22 @@ jobs:
1616
steps:
1717
- name: Notify slack fail
1818
if: ${{ inputs.job_result == 'failure' && github.repository == 'OpenSIPS/opensips' }}
19-
env:
20-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
21-
uses: voxmedia/github-action-slack-notify-build@v1
19+
uses: slackapi/slack-github-action@v3.0.3
2220
with:
23-
channel: devel
24-
status: FAILED
25-
color: danger
21+
method: chat.postMessage
22+
token: ${{ secrets.SLACK_BOT_TOKEN }}
23+
payload: |
24+
channel: devel
25+
text: ":x: ${{ inputs.job_name }} failed in ${{ github.repository }}"
26+
blocks:
27+
- type: section
28+
text:
29+
type: mrkdwn
30+
text: ":x: *${{ inputs.job_name }}* failed in *${{ github.repository }}*"
31+
- type: context
32+
elements:
33+
- type: mrkdwn
34+
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Open this run in GitHub Actions>"
2635
2736
- name: Post Fail
2837
if: ${{ inputs.job_result == 'failure' }}

0 commit comments

Comments
 (0)