Skip to content

Commit 4eb6478

Browse files
committed
Use the import path provided via the action input to download package
1 parent 2c7a418 commit 4eb6478

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

entrypoint.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
readonly TAG=${GITHUB_REF#refs/tags/*}
44
readonly VERSION=${TAG##*/}
55

6-
PACKAGE=github.com/${GITHUB_REPOSITORY}
6+
PACKAGE=${INPUT_IMPORT_PATH:=github.com/${GITHUB_REPOSITORY}}
7+
8+
# submodules version tags are formatted as <submodule>/vX.Y.Z,
9+
# so we extract the submodule name and append it to the main module
10+
# import path
711
if [[ "$VERSION" != "$TAG" ]]; then
8-
PACKAGE=github.com/${GITHUB_REPOSITORY}/${TAG%"/$VERSION"}
12+
PACKAGE=${PACKAGE}/${TAG%"/$VERSION"}
913
fi
1014

1115
# if version > 1, then add the version scope

0 commit comments

Comments
 (0)