Skip to content

Commit

Permalink
feat: Add support for specifying a specific version of the CLI (#51)
Browse files Browse the repository at this point in the history
* feat: Add support for specifying a specific version of the CLI

* Print version
  • Loading branch information
gmpinder authored May 31, 2024
1 parent c4592d4 commit 91ad95d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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.
Expand Down Expand Up @@ -119,8 +123,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
Expand All @@ -144,6 +150,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
Expand Down

0 comments on commit 91ad95d

Please sign in to comment.