From 6ae193e0ac65ce5922573fe9b9f7be60a27016e9 Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Thu, 30 May 2024 16:35:21 -0400 Subject: [PATCH 1/2] feat: Add support for specifying a specific version of the CLI --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c8f0d45..b60fb0e 100644 --- a/action.yml +++ b/action.yml @@ -38,6 +38,10 @@ inputs: Input must match the string 'true' for the unstable version to be used. required: false default: 'false' + cli_version: + description: | + Set this with a tag, sha, or branch name for the blue-build/cli repo to use that particular version of the CLI tool. This will override the `use_unstable_cli` input for the action. + required: false registry: description: | The container registry to push the built image to. @@ -113,8 +117,10 @@ runs: env: RECIPE: ${{ inputs.recipe }} run: | - if [[ "${{ inputs.use_unstable_cli }}" == "true" ]]; then + if [[ "${{ inputs.use_unstable_cli }}" == "true" && -z "${{ inputs.cli_version }}" ]]; then CLI_VERSION_TAG="main" + elif [ -n "${{ inputs.cli_version }}" ]; then + CLI_VERSION_TAG="${{ inputs.cli_version }}" else CLI_VERSION_TAG="v0.8" fi From b5df6834c38067dd809793e606ad0ede74ca02f4 Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Thu, 30 May 2024 16:40:09 -0400 Subject: [PATCH 2/2] Print version --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index b60fb0e..073ec80 100644 --- a/action.yml +++ b/action.yml @@ -144,6 +144,7 @@ runs: ghcr.io/blue-build/cli:${{ env.CLI_VERSION_TAG }}-installer docker cp blue-build-installer:/out/bluebuild /usr/local/bin/bluebuild docker rm blue-build-installer + bluebuild --version # Required in order for docker buildx to # take advantage of the GHA cache API