File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed
Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change 3838 pip list
3939 - name : Run unit tests with pytest / pytest-copie
4040 run : |
41- python -m pytest
41+ python -m pytest
42+ - name : Send status to Slack app
43+ if : ${{ failure() && github.event_name != 'workflow_dispatch' }}
44+ id : slack
45+ uses : slackapi/slack-github-action@v1
46+ with :
47+ payload : |
48+ {
49+ "blocks": [
50+ {
51+ "type": "header",
52+ "text": {
53+ "type": "plain_text",
54+ "text": "${{ github.repository }}"
55+ }
56+ },
57+ {
58+ "type": "section",
59+ "text": {
60+ "type": "mrkdwn",
61+ "text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:"
62+ }
63+ },
64+ {
65+ "type": "divider"
66+ },
67+ {
68+ "type": "section",
69+ "text": {
70+ "type": "mrkdwn",
71+ "text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
72+ }
73+ }
74+ ]
75+ }
76+ env :
77+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
78+ SLACK_WEBHOOK_TYPE : INCOMING_WEBHOOK
You can’t perform that action at this time.
0 commit comments