mirror of
https://github.com/dagger/dagger-for-github.git
synced 2026-01-01 05:00:21 +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
|
|
@ -27,6 +27,10 @@
|
||||||
version: "0.11.0"
|
version: "0.11.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Staying in sync with the `latest` version
|
||||||
|
|
||||||
|
By setting the version to `latest`, this action will install the latest version of Dagger.
|
||||||
|
|
||||||
### All `with:` input parameter options
|
### All `with:` input parameter options
|
||||||
|
|
||||||
| Key | Description | Required | Default |
|
| Key | Description | Required | Default |
|
||||||
|
|
|
||||||
11
action.yml
11
action.yml
|
|
@ -44,10 +44,19 @@ runs:
|
||||||
prefix_dir="$(mktemp -d)"
|
prefix_dir="$(mktemp -d)"
|
||||||
fi
|
fi
|
||||||
printf '%s/bin' "$prefix_dir" >> $GITHUB_PATH
|
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
|
# The install.sh script creates path ${prefix_dir}/bin
|
||||||
cd "$prefix_dir" && { \
|
cd "$prefix_dir" && { \
|
||||||
curl -sL https://dl.dagger.io/dagger/install.sh 2>/dev/null | \
|
curl -sL https://dl.dagger.io/dagger/install.sh 2>/dev/null | \
|
||||||
DAGGER_VERSION=${{ inputs.version }} sh; }
|
DAGGER_VERSION=$VERSION sh; }
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue