Allow version without v (#194)

* add v to version if it does not have a leading v

Signed-off-by: kpenfound <kyle@dagger.io>

* test version without the v

Signed-off-by: kpenfound <kyle@dagger.io>

---------

Signed-off-by: kpenfound <kyle@dagger.io>
This commit is contained in:
Kyle Penfound 2025-10-01 11:01:20 -04:00 committed by GitHub
parent 1b7f3b8d6b
commit d809c269da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View file

@ -80,6 +80,9 @@ runs:
VERSION=${{ inputs.version }}
if [[ "$VERSION" == "latest" ]]; then
VERSION=
elif [[ -n "$VERSION" && "$VERSION" != v* ]]; then
# Add 'v' prefix if version doesn't start with 'v' and is not empty
VERSION="v$VERSION"
fi
latest=$(curl https://dl.dagger.io/dagger/versions/latest)