mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-15 07:37:13 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
92e7146349 | |||
3ff814758e | |||
4ca0e628b9 | |||
abc498d7d3 | |||
13d7e7a55b | |||
e5e36c4a4e | |||
af185b4d18 | |||
57a738dc67 | |||
120f6587bc | |||
434b33a73f | |||
5b676d2d40 |
28
README.md
28
README.md
@ -17,6 +17,7 @@ Suggestions and issues can be posted on the repositories [issues page](https://g
|
|||||||
* [target](#target)
|
* [target](#target)
|
||||||
* [always_pull](#always_pull)
|
* [always_pull](#always_pull)
|
||||||
* [build_args](#build_args)
|
* [build_args](#build_args)
|
||||||
|
* [cache_froms](#cache_froms)
|
||||||
* [labels](#labels)
|
* [labels](#labels)
|
||||||
* [add_git_labels](#add_git_labels)
|
* [add_git_labels](#add_git_labels)
|
||||||
* [push](#push)
|
* [push](#push)
|
||||||
@ -86,11 +87,13 @@ Example:
|
|||||||
|
|
||||||
### `path`
|
### `path`
|
||||||
|
|
||||||
Path to run the docker build from. Defaults to `.`.
|
Path to the build context. Defaults to `.`
|
||||||
|
|
||||||
### `dockerfile`
|
### `dockerfile`
|
||||||
|
|
||||||
Name of the Dockerfile. Defaults to `{path}/Dockerfile`.
|
Path to the Dockerfile. Defaults to `{path}/Dockerfile`
|
||||||
|
|
||||||
|
Note when set this path is **not** relative to the `path` input but is instead relative to the current working directory.
|
||||||
|
|
||||||
### `target`
|
### `target`
|
||||||
|
|
||||||
@ -112,6 +115,15 @@ Example:
|
|||||||
build_args: arg1=value1,arg2=value2
|
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`
|
### `labels`
|
||||||
|
|
||||||
Comma-delimited list of labels to add to the built image.
|
Comma-delimited list of labels to add to the built image.
|
||||||
@ -191,3 +203,15 @@ with:
|
|||||||
tag_with_ref: true
|
tag_with_ref: true
|
||||||
target: mytarget
|
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
|
||||||
|
```
|
||||||
|
@ -6,7 +6,7 @@ branding:
|
|||||||
color: 'blue'
|
color: 'blue'
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: docker://docker/github-actions:v1.0
|
image: docker://docker/github-actions:v1
|
||||||
args:
|
args:
|
||||||
- build-push
|
- build-push
|
||||||
inputs:
|
inputs:
|
||||||
@ -34,11 +34,11 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
path:
|
path:
|
||||||
description: Path to run docker build from
|
description: Path to the build context
|
||||||
required: false
|
required: false
|
||||||
default: "."
|
default: "."
|
||||||
dockerfile:
|
dockerfile:
|
||||||
description: Name of the Dockerfile (Default is 'path/Dockerfile')
|
description: Path to the Dockerfile (Default is '{path}/Dockerfile')
|
||||||
required: false
|
required: false
|
||||||
target:
|
target:
|
||||||
description: Sets the target stage to build
|
description: Sets the target stage to build
|
||||||
@ -50,6 +50,9 @@ inputs:
|
|||||||
build_args:
|
build_args:
|
||||||
description: Comma-delimited list of build-time variables
|
description: Comma-delimited list of build-time variables
|
||||||
required: false
|
required: false
|
||||||
|
cache_froms:
|
||||||
|
description: Comma-delimited list of images to consider as cache sources
|
||||||
|
required: false
|
||||||
labels:
|
labels:
|
||||||
description: Comma-delimited list of labels to add to the built image
|
description: Comma-delimited list of labels to add to the built image
|
||||||
required: false
|
required: false
|
||||||
|
Reference in New Issue
Block a user