Skip to content

Commit 3cbd26a

Browse files
authored
feat: add "push" option to allow opting out of pushing (#118)
The option defaults to "true"; setting it to "false" makes BlueBuild not attempt to push the image to a container registry, which can be useful for test builds that aren't intended to be published.
1 parent 5d15e0a commit 3cbd26a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ inputs:
1212
1313
Example: `${{ secrets.SIGNING_SECRET }}`
1414
required: true
15+
push:
16+
description: |
17+
Whether to push the image to a container registry.
18+
required: false
19+
default: "true"
1520
registry_token:
1621
description: |
1722
The token used to sign into the container registry.
@@ -302,6 +307,7 @@ runs:
302307
env:
303308
COSIGN_PRIVATE_KEY: ${{ inputs.cosign_private_key }}
304309
GH_TOKEN: ${{ inputs.registry_token }}
310+
BB_BUILD_PUSH: ${{ inputs.push }}
305311
BB_PASSWORD: ${{ inputs.registry_token }}
306312
BB_USERNAME: ${{ inputs.registry_username }}
307313
BB_REGISTRY: ${{ inputs.registry }}
@@ -338,7 +344,7 @@ runs:
338344
fi
339345
340346
if [ -n "$RUN_SUDO" ]; then
341-
sudo -E bluebuild build -v --push "${BUILD_OPTS[@]}" "${RECIPE_PATH}"
347+
sudo -E bluebuild build -v "${BUILD_OPTS[@]}" "${RECIPE_PATH}"
342348
else
343-
bluebuild build -v --push "${BUILD_OPTS[@]}" "${RECIPE_PATH}"
349+
bluebuild build -v "${BUILD_OPTS[@]}" "${RECIPE_PATH}"
344350
fi

0 commit comments

Comments
 (0)