Skip to content

Commit 5aaa7c4

Browse files
authored
Fix third party license generation (#136)
Co-authored-by: Simon Beal <[email protected]>
1 parent c685a73 commit 5aaa7c4

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.github/workflows/generate_third_party_licenses.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@ on:
55
tags: [ "v[0-9]+.[0-9]+.[0-9]+" ]
66
branches: [ "dependabot/*", "main", "workflow/*" ]
77
workflow_call:
8+
outputs:
9+
artifact_name:
10+
description: "The created artifact name for ORT results"
11+
value: ${{ jobs.generate_third_party_licenses.outputs.artifact_name }}
812

913
jobs:
1014
generate_third_party_licenses:
1115
name: Generate NOTICE_DEFAULT file
1216
runs-on: ubuntu-20.04
1317

18+
outputs:
19+
artifact_name: ${{ steps.artifact_name.outputs.artifact_name }}
20+
1421
steps:
1522
- uses: actions/checkout@v4
1623
- name: Install Python dependencies
@@ -38,3 +45,8 @@ jobs:
3845
reporter,
3946
upload-results
4047
sw-version: "-"
48+
49+
- name: Export artifact name
50+
id: artifact_name
51+
run: |
52+
echo "artifact_name=${ORT_RESULTS_ARTIFACT_NAME}" >> $GITHUB_OUTPUT

.github/workflows/wheels.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ jobs:
3434

3535
steps:
3636
- uses: actions/checkout@v4
37-
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-
4837
- name: Configure AWS credentials
4938
uses: aws-actions/configure-aws-credentials@v4
5039
id: creds
@@ -58,7 +47,7 @@ jobs:
5847
# https://github.com/actions/upload-artifact/issues/478
5948
- uses: actions/download-artifact@v3
6049
with:
61-
name: ${{ env.ARTIFACT_NAME }}
50+
name: ${{ needs.generate_third_party_licenses.outputs.artifact_name }}
6251

6352
- name: Rename third party license
6453
run: |
@@ -91,7 +80,7 @@ jobs:
9180

9281
- uses: actions/download-artifact@v3
9382
with:
94-
name: ${{ env.ARTIFACT_NAME }}
83+
name: ${{ needs.generate_third_party_licenses.outputs.artifact_name }}
9584

9685
- name: Copy license files
9786
run: |

0 commit comments

Comments
 (0)