From f4a03943fe405cb8892ffde6558fc09662d20d58 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Fri, 7 Oct 2022 14:49:45 -0600 Subject: [PATCH] feat: add docker-context and docker-file input parameters --- README.md | 6 +++++- action.yml | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e417971..3651ca2 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,18 @@ Note that the following inputs map directly to the [google-github-actions/deploy - `env-vars` - `flags` +- `mounted-secrets`* - `region` - `service` -- `mounted-secrets`* _\* doesn't map directly_ Note that the following inputs map directly to the [docker/build-push-action](https://github.com/docker/build-push-action#inputs) with a `docker-` prefix: +- `docker-build-args` +- `docker-context` +- `docker-file` + ```yml name: Push Events diff --git a/action.yml b/action.yml index 4be1bbf..58e0681 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,13 @@ inputs: mounted-secrets: description: Cloud run secret mounts. (e.g. /secret/folder/file=secret:latest) required: false + docker-context: + description: Context for docker Build + required: false + default: . + docker-file: + description: Path to Dockerfile + required: false docker-build-args: description: Environment variables to set in the docker image build. (e.g. VITE_DISCOVER=value,VITE_PRINT_PROXY=value) required: false @@ -90,7 +97,8 @@ runs: with: builder: ${{ steps.builder.outputs.name }} tags: ${{ steps.meta.outputs.tags }} - context: . + context: ${{ inputs.docker-context }} + file: ${{ inputs.docker-file }} build-args: ${{ inputs.docker-build-args }} push: true cache-from: type=gha