sending data as a message with slack incomming webhook URL #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Notify with Slack | |
| on: push | |
| jobs: | |
| notify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Post a message in a channel | |
| uses: slackapi/slack-github-action@v2.1.1 | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| webhook-type: incoming-webhook | |
| payload: | | |
| text: "*GitHub Action build result*: ${{ job.status }}\n | |
| ${{ github.event.pull_request.html_url || github.event.head_commit.url }}" | |
| blocks: | |
| - type: "section" | |
| text: | |
| type: "mrkdwn" | |
| text: "GitHub Action build result: ${{ job.status }}\n | |
| ${{ github.event.pull_request.html_url || github.event.head_commit.url }}" |