Skip to content

Commit

Permalink
Adds GCR example
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Waters <waters@me.com>
  • Loading branch information
Andrew Waters committed Apr 16, 2020
1 parent e5e36c4 commit 13d7e7a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,15 @@ 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
```

0 comments on commit 13d7e7a

Please sign in to comment.