Skip to content

Commit 696b64d

Browse files
author
Bryan Sieber
committed
Updates to login
1 parent 4bdad17 commit 696b64d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/build-image.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ jobs:
6767
#
6868
# - name: Push Docker image
6969
# run: docker push $IMAGE_NAME
70+
- name: Login to GCR
71+
uses: docker/login-action@v1
72+
with:
73+
registry: gcr.io
74+
username: _json_key
75+
password: ${{ secrets.GCP_CREDENTIALS }}
7076

7177
- name: Build and push to GCR v2
7278
id: build-push
@@ -83,6 +89,6 @@ jobs:
8389
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > ./version.json
8490
docker build --file infra/Dockerfile -t $GCR_REGISTRY/$GCR_REPOSITORY:$IMAGE_TAG .
8591
docker image tag $GCR_REGISTRY/$GCR_REPOSITORY:$IMAGE_TAG $GCR_REGISTRY/$GCR_REPOSITORY:latest
86-
echo $GCP_CREDENTIALS | docker login -u _json_key --password-stdin https://gcr.io
92+
# echo ${{ secrets.GCP_CREDENTIALS }} | docker login -u _json_key --password-stdin https://gcr.io
8793
docker push $GCR_REGISTRY/$GCR_REPOSITORY:$IMAGE_TAG
8894
docker push $GCR_REGISTRY/$GCR_REPOSITORY:latest

0 commit comments

Comments
 (0)