diff --git a/container-scan/README.md b/container-scan/README.md index 9e62387..0c51aed 100644 --- a/container-scan/README.md +++ b/container-scan/README.md @@ -40,6 +40,7 @@ To use this action in your GitHub Actions workflow, include the following steps: | image-tag | Docker image tag | `true` | | | image-platform | Target platform to build image for (eg. linux/amd64 (default), linux/arm64, etc) | `false` | linux/amd64 | | build-args | List of build arguments for docker build as key-value pairs (e.g., KEY=VALUE) | `false` | | +| build-contexts | List of additional build contexts (e.g., name=path) | `false` | | | secrets | List of secrets for docker build as key-value pairs (e.g., SECRET_KEY=VALUE) | `false` | | | enable-docker-build | Docker image tag | `false` | true | diff --git a/container-scan/action.yaml b/container-scan/action.yaml index 150b66d..71a1c55 100644 --- a/container-scan/action.yaml +++ b/container-scan/action.yaml @@ -33,11 +33,14 @@ inputs: description: Target platform to build image for (eg. linux/amd64 (default), linux/arm64, etc) required: false default: linux/amd64 - build-args: required: false description: List of build arguments for docker build as key-value pairs (e.g., KEY=VALUE) default: "" + build-contexts: + required: false + description: List of additional build contexts (e.g., name=path) + default: "" secrets: required: false description: List of secrets for docker build as key-value pairs (e.g., SECRET_KEY=VALUE) @@ -74,6 +77,7 @@ runs: type=ref,event=branch type=ref,event=pr build-args: ${{ inputs.build-args }} + build-contexts: ${{ inputs.build-contexts }} secrets: ${{ inputs.secrets }} - name: "Determining image name" diff --git a/docker-build/README.md b/docker-build/README.md index 4789325..af7cc61 100644 --- a/docker-build/README.md +++ b/docker-build/README.md @@ -51,9 +51,9 @@ steps: type=semver,pattern={{version}},value=${{ steps.release.outputs.new-release-version }} ``` -#### Dynamically input multiple build arguments and secrets: +#### Dynamically input multiple build arguments, contexts and secrets: -If you want to pass multiple build arguments and secrets, you can use the `build-args` and `secrets` input parameters. +If you want to pass multiple build arguments and secrets, you can use the `build-args`, `build-contexts` and `secrets` input parameters. ```yaml steps: @@ -74,6 +74,9 @@ steps: build-args: | KEY1=VALUE1 KEY2=VALUE2 + build-contexts: | + context1=PATH1 + context2=PATH2 secrets: | SECRET_KEY1=SECRET_VALUE1 SECRET_KEY2=SECRET_VALUE2 @@ -98,6 +101,7 @@ steps: | push | Do you want to push the image to the registry | `false` | false | | load | Do you want to load the single-platform build result to docker images | `false` | true | | build-args | List of build arguments as key-value pairs (e.g., KEY=VALUE) | `false` | | +| build-contexts | List of additional build contexts (e.g., name=path) | `false` | | | secrets | List of secrets as key-value pairs (e.g., SECRET_KEY=VALUE) | `false` | | ## Outputs diff --git a/docker-build/action.yaml b/docker-build/action.yaml index 95423ab..23bd991 100644 --- a/docker-build/action.yaml +++ b/docker-build/action.yaml @@ -37,6 +37,10 @@ inputs: required: false description: List of build arguments as key-value pairs (e.g., KEY=VALUE) default: "" + build-contexts: + required: false + description: List of additional build contexts (e.g., name=path) + default: "" secrets: required: false description: List of secrets as key-value pairs (e.g., SECRET_KEY=VALUE) @@ -115,3 +119,5 @@ runs: labels: ${{ steps.meta.outputs.labels }} secrets: | ${{ inputs.secrets }} + build-contexts: | + ${{ inputs.build-contexts }}