From 08ab7ec3adf5dc7f432380e8cc99b1ffb561ef4b Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Mon, 21 Oct 2024 13:17:47 +0100 Subject: [PATCH] feat: allow specifying nightly builds Signed-off-by: Justin Chadwell --- README.md | 1 + action.yml | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 034dea3..c06e696 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ By setting the version to `latest`, this action will install the latest version | Key | Description | Required | Default | | -------------- | ----------------------------------------------------------- | -------- | ------------------ | | `version` | Dagger Version | false | '0.13.5' | +| `commit` | Dagger Dev Commit (overrides `version`) | false | '' | | `dagger-flags` | Dagger CLI Flags | false | '--progress plain' | | `verb` | CLI verb (call, run, download, up, functions, shell, query) | false | 'call' | | `workdir` | The working directory in which to run the Dagger CLI | false | '.' | diff --git a/action.yml b/action.yml index 6d9e583..918fbe0 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,10 @@ inputs: description: "Dagger Version" required: false default: "0.13.5" + commit: + description: "Dagger Dev Commit" + required: false + default: "" dagger-flags: description: "Dagger CLI Flags" required: false @@ -47,17 +51,12 @@ runs: 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 + COMMIT=${{ inputs.commit }} # The install.sh script creates path ${prefix_dir}/bin curl -fsS https://dl.dagger.io/dagger/install.sh \ - | BIN_DIR=${prefix_dir}/bin DAGGER_VERSION=$VERSION sh + | BIN_DIR=${prefix_dir}/bin DAGGER_VERSION="$VERSION" DAGGER_COMMIT="$COMMIT" sh - shell: bash env: