Skip to content

Commit

Permalink
feat: add docker-context and docker-file input parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis authored and steveoh committed Oct 12, 2022
1 parent 7e7184b commit f4a0394
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f4a0394

Please sign in to comment.