Skip to content

Commit 640cc6f

Browse files
committed
tweak notification
1 parent 2e03328 commit 640cc6f

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/generate-go-docs.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ jobs:
6464
env:
6565
FILTERS: ${{ steps.changes.outputs.changes }}
6666
run: |
67+
# remove after test
68+
exit 1
6769
PATH=$PATH:$(go env GOPATH)/bin
6870
export PATH
6971
@@ -109,10 +111,7 @@ jobs:
109111

110112
- name: Remove costs before committing
111113
shell: bash
112-
run: |
113-
rm -rf costs
114-
# remove after testing
115-
exit 1
114+
run: rm -rf costs
116115

117116
- name: Setup GitHub Token for creating a new PR
118117
id: setup-github-token-write
@@ -134,7 +133,7 @@ jobs:
134133

135134
- name: Send Slack notification
136135
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
137-
if: failure() || cancelled()
136+
if: failure()
138137
id: slack
139138
env:
140139
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
@@ -144,20 +143,27 @@ jobs:
144143
{
145144
"attachments": [
146145
{
147-
"color": "${{ contains(join(needs.*.result, ','), 'failure') && '#C62828' || contains(join(needs.*.result, ','), 'cancelled') && '#FFA000' || '2E7D32' }}",
146+
"color": "#C62828",
148147
"blocks": [
149148
{
150149
"type": "section",
151150
"text": {
152151
"type": "mrkdwn",
153-
"text": "Go doc generation - ${{ contains(join(needs.*.result, ','), 'failure') && 'Failed :x:' || contains(join(needs.*.result, ','), 'cancelled') && 'Cancelled :warning:' }}"
152+
"text": "Go doc generation - Failed :x:"
154153
}
155154
},
156155
{
157156
"type": "section",
158157
"text": {
159158
"type": "mrkdwn",
160-
"text": "${{ github.ref_name }} | <${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}|PR#${{ github.event.pull_request.number }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>"
159+
"text": "<@U060CGGPY8H>, please have a look."
160+
}
161+
},
162+
{
163+
"type": "section",
164+
"text": {
165+
"type": "mrkdwn",
166+
"text": <${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}|PR#${{ github.event.pull_request.number }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
161167
}
162168
}
163169
]

0 commit comments

Comments
 (0)