-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e36995
commit ce312b5
Showing
1 changed file
with
16 additions
and
28 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 |
---|---|---|
|
@@ -176,38 +176,26 @@ jobs: | |
uses: slackapi/[email protected] | ||
if: ${{ always() && contains(needs.*.result, 'failure') }} | ||
with: | ||
channel-id: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }} | ||
method: chat.postMessage | ||
token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Backend deploy failed `${{ github.event.inputs.flavor }}`>", | ||
"type": "mrkdwn" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }} | ||
blocks: | ||
- type: section | ||
text: | ||
type: mrkdwn | ||
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Backend deploy failed `${{ github.event.inputs.flavor }}`>" | ||
- name: Post Cancel event to a Slack channel | ||
id: cancel-slack | ||
uses: slackapi/[email protected] | ||
if: ${{ always() && contains(needs.*.result, 'cancelled') && !contains(needs.*.result, 'failure') }} | ||
with: | ||
channel-id: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }} | ||
token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
method: chat.postMessage | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Backend deploy cancelled `${{ github.event.inputs.flavor }}`>", | ||
"type": "mrkdwn" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }} | ||
blocks: | ||
- type: section | ||
text: | ||
type: mrkdwn | ||
text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Backend deploy cancelled `${{ github.event.inputs.flavor }}`>" |