Skip to content

Commit

Permalink
Feature: Variable Passthrough & Debug input (#62)
Browse files Browse the repository at this point in the history
* add debug flag

* skip login

* Revert "skip login"

This reverts commit 67bd66d.

* add additoinal inputs
  • Loading branch information
Benbentwo authored Apr 26, 2024
1 parent 22eced2 commit 51728c1
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ branding:
icon: 'box'
color: 'white'
inputs:
allow:
description: "List of extra privileged entitlement (e.g., network.host,security.insecure)"
required: false
network:
description: "Set the networking mode for the RUN instructions during build"
required: false
buildkitd-flags:
description: 'BuildKit daemon flags'
default: '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
required: false
driver-opts:
description: 'List of additional driver-specific options. (eg. image=moby/buildkit:master)'
required: false
workdir:
description: 'Working directory'
required: false
Expand Down Expand Up @@ -76,6 +89,10 @@ inputs:
description: "Set to `true` to tag images with the PR HEAD SHA instead of the merge commit SHA within pull requests."
required: false
default: "false"
debug:
description: "Enable debug mode"
required: false
default: "false"
outputs:
image:
description: "Docker image name"
Expand Down Expand Up @@ -164,7 +181,8 @@ runs:
uses: docker/setup-buildx-action@v3
with:
endpoint: buildx-context

buildkitd-flags: "${{ inputs.debug == 'true' && '--debug' || '' }} ${{ inputs.buildkitd-flags }}"
driver-opts: ${{ inputs.driver-opts }}
- name: Login
uses: docker/login-action@v3
if: ${{ contains(inputs.registry, '.amazonaws.com') || ( inputs.login != '' && inputs.password != '' ) }}
Expand All @@ -177,6 +195,8 @@ runs:
uses: docker/build-push-action@v5
id: docker-build-push-action
with:
allow: ${{ inputs.allow }}
network: ${{ inputs.network }}
context: ${{ inputs.workdir }}
file: ${{ inputs.workdir }}/${{ inputs.file }}
pull: true
Expand Down

0 comments on commit 51728c1

Please sign in to comment.