Merge pull request #31 from andrew-waters/example-gcr

Adds GCR example
This commit is contained in:
Nick Adcock 2020-04-23 13:14:11 +01:00 committed by GitHub
commit 3ff814758e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,4 +192,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
```