Merge pull request #4623 from blackpiglet/push-image-in-github-workflow

Add pushing image to GCR in github workflow
This commit is contained in:
qiuming
2022-03-01 15:52:45 +08:00
committed by GitHub
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -55,3 +55,16 @@ jobs:
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
./hack/docker-push.sh
# Use the JSON key in secret to login gcr.io
- uses: 'docker/login-action@v1'
with:
registry: 'gcr.io' # or REGION.docker.pkg.dev
username: '_json_key'
password: '${{ secrets.GCR_SA_KEY }}'
# Push image to GCR to facilitate some environments that have rate limitation to docker hub, e.g. vSphere.
- name: Publish container image to GCR
if: github.repository == 'vmware-tanzu/velero'
run: |
REGISTRY=gcr.io/velero-gcp ./hack/docker-push.sh