mirror of
https://github.com/dagger/dagger-for-github.git
synced 2025-12-31 20:59:43 +11:00
feat: support latest as an option for the version input (#115)
Signed-off-by: purpleclay <purpleclaygh@gmail.com>
This commit is contained in:
parent
5c13044a77
commit
6cec00fab9
2 changed files with 14 additions and 1 deletions
11
action.yml
11
action.yml
|
|
@ -44,10 +44,19 @@ runs:
|
|||
prefix_dir="$(mktemp -d)"
|
||||
fi
|
||||
printf '%s/bin' "$prefix_dir" >> $GITHUB_PATH
|
||||
|
||||
# If the dagger version is 'latest', set the version back to an empty
|
||||
# string. This allows the install script to detect and install the latest
|
||||
# version itself
|
||||
VERSION=${{ inputs.version }}
|
||||
if [[ "$VERSION" == "latest" ]]; then
|
||||
VERSION=
|
||||
fi
|
||||
|
||||
# The install.sh script creates path ${prefix_dir}/bin
|
||||
cd "$prefix_dir" && { \
|
||||
curl -sL https://dl.dagger.io/dagger/install.sh 2>/dev/null | \
|
||||
DAGGER_VERSION=${{ inputs.version }} sh; }
|
||||
DAGGER_VERSION=$VERSION sh; }
|
||||
shell: bash
|
||||
|
||||
- run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue