Skip to content

Commit b350be9

Browse files
authored
Update slack-webhook.yaml
1 parent 251bd43 commit b350be9

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed
Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
- name: Post a message in a channel
2-
uses: slackapi/[email protected]
3-
with:
4-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
5-
webhook-type: incoming-webhook
6-
payload: |
7-
text: "*GitHub Action build result*: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
8-
blocks:
9-
- type: "section"
10-
text:
11-
type: "mrkdwn"
12-
text: "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
1+
name: Push to Slack
2+
3+
on: push
4+
5+
jobs:
6+
my-job:
7+
name: Push to Slack
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Post a message in a channel
11+
12+
env:
13+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
14+
uses: slackapi/[email protected]
15+
with:
16+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
17+
webhook-type: incoming-webhook
18+
payload: |
19+
text: "*GitHub Action build result*: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
20+
blocks:
21+
- type: "section"
22+
text:
23+
type: "mrkdwn"
24+
text: "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"

0 commit comments

Comments
 (0)