mirror of
https://github.com/docker/build-push-action
synced 2024-11-10 05:21:40 +00:00
commit
3ff814758e
1 changed files with 13 additions and 1 deletions
12
README.md
12
README.md
|
@ -193,3 +193,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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue