Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add input to use unstable cli (#17) #26

Merged
merged 2 commits into from
Mar 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ inputs:
Input must match the string 'true' for the step to be enabled.
required: false
default: 'false'
use_unstable_cli:
description: |
If true, this action pulls the `main` branch of blue-build/cli instead of the stable version the current action version is configured to use by default.
This feature is useful for testing new features, but should not be used in production.
Input must match the string 'true' for the unstable version to be used.
required: false
default: 'false'
registry:
description: |
The container registry to push the built image to.
Expand Down Expand Up @@ -67,15 +74,17 @@ runs:
COSIGN_PRIVATE_KEY: ${{ inputs.cosign_private_key }}
GH_TOKEN: ${{ inputs.registry_token }}
GH_PR_EVENT_NUMBER: ${{ inputs.pr_event_number }}
# Uses GitHubs ternary syntax to set cli version, see https://docs.github.com/en/actions/learn-github-actions/expressions#example
CLI_VERSION_TAG: ${{ inputs.use_unstable_cli == 'true' && 'main' || 'v0.8.1' }}}}
run: |
podman run \
-v buildah-vol:/var/run/containerd \
-v $PWD:/bluebuild \
-v ${PWD}:/bluebuild \
--env-host \
--network=host \
--privileged \
--device /dev/fuse \
ghcr.io/blue-build/cli:v0.8.1-alpine \
ghcr.io/blue-build/cli:${CLI_VERSION_TAG}-alpine \
build -vv --push ./config/${{ inputs.recipe }} \
--registry ${{inputs.registry}} \
--registry-namespace ${{inputs.registry_namespace}}
--registry ${{ inputs.registry }} \
--registry-namespace ${{ inputs.registry_namespace }}