Skip to content

Commit

Permalink
ci(actions): fix slack alert (#7692)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 0da6646c72980381e3de376adad19b49238e8b53
  • Loading branch information
pw-ppodhajski authored and Manul from Pathway committed Nov 18, 2024
1 parent 798e303 commit a08ef25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/package_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit a08ef25

Please sign in to comment.