Skip to content

Commit 5744f50

Browse files
committed
Add the package_name input
1 parent 46ab7da commit 5744f50

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ inputs:
66
description: 'Script to test for invalidations. Defaults to `using Package`'
77
required: false
88
default: ''
9+
package_name:
10+
description: 'Name of the package. By default, tries to auto-detect from the repo name.'
11+
required: false
12+
default: ''
913

1014
outputs:
1115
total:
@@ -22,7 +26,12 @@ runs:
2226
id: info
2327
run: |
2428
REPONAME="${{ github.event.repository.name }}"
25-
PACKAGENAME=${REPONAME%.jl}
29+
if [[ '${{ inputs.package_name }}' == '' ]]; then
30+
PACKAGENAME=${REPONAME%.jl}
31+
else
32+
PACKAGENAME=""
33+
PACKAGENAME="${{ inputs.package_name }}"
34+
fi
2635
echo "packagename=$PACKAGENAME" >> $GITHUB_OUTPUT
2736
if [[ '${{ inputs.test_script }}' == '' ]]; then
2837
TESTSCRIPT="using ${PACKAGENAME}"

0 commit comments

Comments
 (0)