From 13d7e7a55bd224aa70bcd907c76503dc47b168e3 Mon Sep 17 00:00:00 2001 From: Andrew Waters Date: Thu, 16 Apr 2020 14:05:44 +0100 Subject: [PATCH 1/2] Adds GCR example Signed-off-by: Andrew Waters --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de81c4c..17ff8dd 100644 --- a/README.md +++ b/README.md @@ -192,4 +192,15 @@ with: repository: myorg/myrepository tag_with_ref: true target: mytarget -``` \ No newline at end of file +``` + +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 +``` From 4ca0e628b91886e93a61d46664e0a6f90fc739af Mon Sep 17 00:00:00 2001 From: Andrew Waters Date: Thu, 23 Apr 2020 13:09:57 +0100 Subject: [PATCH 2/2] Add: explicit tag Signed-off-by: Andrew Waters --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 17ff8dd..d83c29b 100644 --- a/README.md +++ b/README.md @@ -203,4 +203,5 @@ with: password: ${{ secrets.DOCKER_PASSWORD }} registry: gcr.io repository: myorg/myrepository + tags: latest ```