Skip to content

Commit f8b4082

Browse files
muddyfishdnanuti
andauthored
Fix syntax error in 'wheels.yml' (#131)
Add notify-wheel-failure.yml to notify us when "Build Wheels" workflow fails execution. Co-authored-by: Simon Beal <[email protected]> Co-authored-by: Diana Nanuti <[email protected]>
1 parent ec97567 commit f8b4082

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Workflow Failure Slack Notifier
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- Build Wheels
7+
types: [completed]
8+
9+
jobs:
10+
on-failure:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
13+
steps:
14+
- name: Send notification to Slack
15+
uses: slackapi/[email protected]
16+
with:
17+
payload: |
18+
{
19+
"action": "${{ github.event.action }}",
20+
"conclusion": "${{ github.event.workflow_run.conclusion }}",
21+
"workflow_name": "${{ github.event.workflow.name }}",
22+
"workflow_run_url": "${{ github.event.workflow_run.html_url }}"
23+
}
24+
env:
25+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_WORKFLOW_FAILURE }}
26+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
# https://github.com/actions/upload-artifact/issues/478
5959
- uses: actions/download-artifact@v3
6060
with:
61-
name: ${{ ARTIFACT_NAME }}
61+
name: ${{ env.ARTIFACT_NAME }}
6262

6363
- name: Rename third party license
6464
run: |
@@ -91,7 +91,7 @@ jobs:
9191

9292
- uses: actions/download-artifact@v3
9393
with:
94-
name: ${{ ARTIFACT_NAME }}
94+
name: ${{ env.ARTIFACT_NAME }}
9595

9696
- name: Copy license files
9797
run: |

0 commit comments

Comments
 (0)