Skip to content

Commit 0e4c6a9

Browse files
authored
Merge pull request #117 from jku/add-artifact-name-input
action: Add an optional input for artifact name
2 parents 6d4eef7 + e6687ff commit 0e4c6a9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

action.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ inputs:
55
entrypoint:
66
description: "client-under-test CLI to invoke"
77
required: true
8+
artifact-name:
9+
description: "Name to use for GitHub artifact upload. The 'entrypoint' will be used by default
10+
but if you call this action in a job matrix, make sure each call gets a unique name"
11+
default: ""
12+
required: false
813
expected-failures:
914
description: "Optional list test names expected to fail"
1015
default: ""
@@ -33,9 +38,14 @@ runs:
3338
ENTRYPOINT: ${{ inputs.entrypoint }}
3439
EXPECTED_FAILURES: ${{ inputs.expected-failures }}
3540
TEST_LOCATION: ${{ github.action_path }}/tuf_conformance
41+
NAME: ${{ inputs.artifact-name }}
3642
run: |
3743
# create a sanitized name for the artifact upload
38-
echo "NAME=${ENTRYPOINT##*/}" >> "$GITHUB_OUTPUT"
44+
if [[ -z $NAME ]]; then
45+
echo "NAME=test repositories for ${ENTRYPOINT##*/}" >> "$GITHUB_OUTPUT"
46+
else
47+
echo "NAME=$NAME" >> "$GITHUB_OUTPUT"
48+
fi
3949
4050
# run test suite
4151
pytest -v "$TEST_LOCATION" \
@@ -48,5 +58,5 @@ runs:
4858
if: ${{ !cancelled() }}
4959
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
5060
with:
51-
name: test repositories for '${{ steps.tuf-conformance.outputs.NAME }}'
61+
name: ${{ steps.tuf-conformance.outputs.NAME }}
5262
path: test-repositories

0 commit comments

Comments
 (0)