Skip to content

Commit 730f7cb

Browse files
committed
rework gcr pushing
1 parent 6975f4d commit 730f7cb

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/jsonparse-release-docker.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,21 @@ jobs:
2626
with:
2727
username: ${{ secrets.DOCKERHUB_USERNAME }}
2828
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
- name: Login to Google Container Registry
30+
shell: bash
31+
run: |
32+
docker login -u _json_key -p '${{ secrets.GCP_SERVICE_ACCOUNT }}' 'https://gcr.io' 2>/dev/null
33+
docker tag '${{ inputs.source_image }}' '${{ inputs.destination_image }}'
34+
docker push '${{ inputs.destination_image }}'
35+
echo "Successfully pushed ${{ inputs.source_image }} to ${{ inputs.destination_image }}"
2936
-
3037
name: Build and push to dockerhub
3138
uses: docker/build-push-action@v3
3239
with:
3340
push: true
34-
tags: ctomkow/jsonparse:${{ github.ref_name }},ctomkow/jsonparse:latest
3541
build-args: VERSION=${{ github.ref_name }}
36-
-
37-
name: push to google compute registry
38-
uses: Dayanand-Chinchure/gcr-upload-action@1.2
39-
with:
40-
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
41-
source_image: ctomkow/jsonparse:${{ github.ref_name }}
42-
destination_image: gcr.io/jsonparse-363219/ctomkow/jsonparse:${{ github.ref_name }}
42+
tags: |
43+
ctomkow/jsonparse:${{ github.ref_name }}
44+
ctomkow/jsonparse:latest
45+
gcr.io/jsonparse-363219/ctomkow/jsonparse:${{ github.ref_name }}
46+
gcr.io/jsonparse-363219/ctomkow/jsonparse:latest

0 commit comments

Comments
 (0)