-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(actions): fix slack alert (#7692)
GitOrigin-RevId: 0da6646c72980381e3de376adad19b49238e8b53
- Loading branch information
1 parent
798e303
commit a08ef25
Showing
2 changed files
with
4 additions
and
7 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 |
---|---|---|
|
@@ -129,20 +129,18 @@ jobs: | |
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
# For posting a simple plain text message | ||
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
webhook-type: webhook-trigger | ||
payload: | | ||
{ | ||
"text": "Repository: ${{ github.repository }}\nAction name: ${{ github.workflow }}\nGitHub Action test: failure :manul:\nPR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nAction run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nPR Author: ${{ github.actor }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"channel": ${{ secrets.SLACK_CI_ALERT }}, | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Repository: ${{ github.repository }}\nAction name: ${{ github.workflow }}\nGitHub Action test: failure :manul:\nPR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nAction run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nPR Author: ${{ github.actor }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
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 |
---|---|---|
|
@@ -393,19 +393,18 @@ jobs: | |
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
webhook-type: webhook-trigger | ||
payload: | | ||
{ | ||
"text": "GitHub Action build result: failure :manul:\nPR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nAction run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nPR Author: ${{ github.event.pull_request.user.login }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"channel": ${{ secrets.SLACK_CI_ALERT }}, | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "GitHub Action build result: failure :manul:\nPR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nAction run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nPR Author: ${{ github.event.pull_request.user.login }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |