From 347b36ac110de9317e6a195131901ee951c71ae7 Mon Sep 17 00:00:00 2001 From: GnP Date: Thu, 21 Aug 2025 15:26:44 -0300 Subject: [PATCH] Add support for alternative build context to build-docker action --- build-docker/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build-docker/action.yml b/build-docker/action.yml index cd37d55..63cc6f8 100644 --- a/build-docker/action.yml +++ b/build-docker/action.yml @@ -32,6 +32,10 @@ inputs: description: "Additional tag to apply to the image" required: false default: "" + build_context: + description: "Directory to use as build context" + required: false + default: "." outputs: tags: @@ -87,7 +91,7 @@ runs: - name: Build image locally for testing uses: docker/build-push-action@v6 with: - context: . + context: ${{ inputs.build_context }} load: true build-args: ${{ inputs.test_build_args }} tags: ${{ inputs.registry }}/${{ inputs.image }}:test @@ -103,7 +107,7 @@ runs: id: build uses: docker/build-push-action@v2 with: - context: . + context: ${{ inputs.build_context }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}