-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try using the slackapi/slack GitHub action
- Loading branch information
1 parent
eac77d9
commit 18281f1
Showing
1 changed file
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,24 @@ jobs: | |
run: go build ./... | ||
- name: Run make.sh test (go vet + go test) | ||
run: ./make.sh test | ||
- name: Post status to Slack testing_builds | ||
if: always() | ||
uses: act10ns/slack@v2 | ||
- name: Send build status to Slack channel | ||
id: slack | ||
uses: slackapi/slack[email protected] | ||
with: | ||
status: ${{ job.status }} | ||
channel: '#testing_builds' | ||
# For posting a rich message using Block Kit | ||
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 }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |