add url_prefix input

This commit is contained in:
liuxiaohua 2024-11-08 09:20:07 +08:00
parent 439b544eb5
commit 9cf6fa0471
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,10 @@ inputs:
description: "mark version."
required: false
default: "latest"
url_prefix:
description: "mark url."
required: false
default: "https://github.com/kovetskiy/mark"
runs:
using: "composite"
steps:

View File

@ -2,6 +2,7 @@
main() {
mark_version="${1}"
url_prefix="${2}"
# shellcheck disable=SC2039
if command -v mark >/dev/null 2>&1; then
@ -10,7 +11,7 @@ main() {
exit 0
fi
url_prefix="https://github.com/kovetskiy/mark/releases"
url_prefix="${url_prefix}/releases"
if [ "${mark_version}" = "latest" ]; then
url_prefix="${url_prefix}/latest/download"
else