Compare commits

..

5 Commits

Author SHA1 Message Date
92e7146349 Merge pull request #35 from docker/add-cache-from
Add cache_froms input to support --cache-from
2020-04-23 18:41:09 +01:00
3ff814758e Merge pull request #31 from andrew-waters/example-gcr
Adds GCR example
2020-04-23 13:14:11 +01:00
4ca0e628b9 Add: explicit tag
Signed-off-by: Andrew Waters <waters@me.com>
2020-04-23 13:10:55 +01:00
abc498d7d3 Add cache_froms input to support --cache-from
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
2020-04-22 16:34:18 +01:00
13d7e7a55b Adds GCR example
Signed-off-by: Andrew Waters <waters@me.com>
2020-04-16 14:07:17 +01:00
2 changed files with 26 additions and 1 deletions

View File

@ -17,6 +17,7 @@ Suggestions and issues can be posted on the repositories [issues page](https://g
* [target](#target)
* [always_pull](#always_pull)
* [build_args](#build_args)
* [cache_froms](#cache_froms)
* [labels](#labels)
* [add_git_labels](#add_git_labels)
* [push](#push)
@ -114,6 +115,15 @@ Example:
build_args: arg1=value1,arg2=value2
```
### `cache_froms`
Comma-delimited list of images to consider as cache sources.
Example:
```yaml
cache_froms: myorg/baseimage:latest
```
### `labels`
Comma-delimited list of labels to add to the built image.
@ -192,4 +202,16 @@ with:
repository: myorg/myrepository
tag_with_ref: true
target: mytarget
```
```
The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, log in to Google Container Registry using GitHub secrets (where `DOCKER_PASSWORD` is a [JSON key](https://cloud.google.com/container-registry/docs/advanced-authentication#json-key)), and push the image to the CGR repository `myorg/myrepository`:
```yaml
uses: docker/build-push-action@v1
with:
username: _json_key
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gcr.io
repository: myorg/myrepository
tags: latest
```

View File

@ -50,6 +50,9 @@ inputs:
build_args:
description: Comma-delimited list of build-time variables
required: false
cache_froms:
description: Comma-delimited list of images to consider as cache sources
required: false
labels:
description: Comma-delimited list of labels to add to the built image
required: false