Skip to content

Commit a4a757c

Browse files
authored
Fix wheel generation artefact name (#125)
Use github repository name for downloading the artefact for third party licenses in wheel generation --------- Co-authored-by: Simon Beal <[email protected]>
1 parent 98468d7 commit a4a757c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/wheels.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v4
3737

38+
- name: Initialise environment
39+
shell: bash
40+
env:
41+
REPO_NAME: ${{ github.event.repository.name }}
42+
run: |
43+
REPO_NAME_SAFE=$(echo $REPO_NAME | sed -e 's/[^A-Za-z0-9 \-\_]//g' -e 's/\s/-/g' -e 's/\([A-Z]\)/\L\1/g')
44+
ARTIFACT_NAME="ort-results-${REPO_NAME_SAFE}--"
45+
export ARTIFACT_NAME
46+
printenv >> "$GITHUB_ENV"
47+
3848
- name: Configure AWS credentials
3949
uses: aws-actions/configure-aws-credentials@v4
4050
id: creds
@@ -48,7 +58,7 @@ jobs:
4858
# https://github.com/actions/upload-artifact/issues/478
4959
- uses: actions/download-artifact@v3
5060
with:
51-
name: "ort-results-s3connectorforpytorch--"
61+
name: ${{ ARTIFACT_NAME }}
5262

5363
- name: Rename third party license
5464
run: |
@@ -81,7 +91,7 @@ jobs:
8191

8292
- uses: actions/download-artifact@v3
8393
with:
84-
name: "ort-results-s3connectorforpytorch--"
94+
name: ${{ ARTIFACT_NAME }}
8595

8696
- name: Copy license files
8797
run: |

0 commit comments

Comments
 (0)