Skip to content

Commit b724d91

Browse files
authored
Send Slack notification only on failure or on demand (#199)
Signed-off-by: Nicolas Rol <[email protected]>
1 parent 922fedb commit b724d91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: .github/workflows/snapshot-ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ jobs:
243243
"type": "section",
244244
"text": {
245245
"type": "mrkdwn",
246-
"text": "*Workflow details:*\n\n${{ steps.format_results.outputs.formatted_results }}\n\nSee logs on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub>"
246+
"text": "*Workflow details:*\n\n${{ steps.format_results.outputs.formatted_results }}\n\n@channel - See logs on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub>"
247247
}
248248
}
249249
]
@@ -254,6 +254,7 @@ jobs:
254254
255255
- name: Send Slack Notification
256256
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
257+
if: ${{ steps.workflow_status.outputs.status != 'Successful' || github.event_name == 'workflow_dispatch' }}
257258
with:
258259
author_name: 'powsybl-metrix on GitHub'
259260
status: custom

0 commit comments

Comments
 (0)