Skip to content

Commit 69766ba

Browse files
committed
Ci pushes to google container registry leios-docker
1 parent 1c638db commit 69766ba

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

.github/workflows/ci.yaml

+22-22
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ jobs:
7878
- name: 🛠️ Set up Docker Buildx
7979
uses: docker/setup-buildx-action@v3
8080

81-
# - name: 👮 Log in to Google Cloud
82-
# id: auth
83-
# uses: 'google-github-actions/auth@v2'
84-
# with:
85-
# token_format: access_token
86-
# credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}'
87-
# access_token_lifetime: 3600s # need to be long enough for docker build to finish
81+
- name: 👮 Log in to Google Cloud
82+
id: auth
83+
uses: 'google-github-actions/auth@v2'
84+
with:
85+
token_format: access_token
86+
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}'
87+
access_token_lifetime: 3600s # need to be long enough for docker build to finish
8888

8989
- name: 👮 Log in to the Container registry
9090
uses: docker/login-action@v3
@@ -126,21 +126,21 @@ jobs:
126126
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:cache
127127
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}:cache,mode=max
128128

129-
# - name: 👮 Login to Artifact Registry
130-
# uses: docker/login-action@v1
131-
# with:
132-
# registry: us-east1-docker.pkg.dev
133-
# username: oauth2accesstoken
134-
# password: ${{ steps.auth.outputs.access_token }}
135-
136-
# - name: 📦 Push to GCR
137-
# run: |-
138-
# docker pull $image_tag
139-
# docker tag $image_tag "us-east1-docker.pkg.dev/iog-hydra/peras-docker/${{ env.IMAGE_NAME}}:$GITHUB_SHA"
140-
# docker push "us-east1-docker.pkg.dev/iog-hydra/peras-docker/${{ env.IMAGE_NAME}}:$GITHUB_SHA"
141-
# env:
142-
# image_id: ${{ steps.push.outputs.imageid }}
143-
# image_tag: ${{ steps.meta.outputs.tags }}
129+
- name: 👮 Login to Artifact Registry
130+
uses: docker/login-action@v1
131+
with:
132+
registry: us-east1-docker.pkg.dev
133+
username: oauth2accesstoken
134+
password: ${{ steps.auth.outputs.access_token }}
135+
136+
- name: 📦 Push to GCR
137+
run: |-
138+
docker pull $image_tag
139+
docker tag $image_tag "us-east1-docker.pkg.dev/iog-hydra/leios-docker/${{ env.IMAGE_NAME}}:$GITHUB_SHA"
140+
docker push "us-east1-docker.pkg.dev/iog-hydra/leios-docker/${{ env.IMAGE_NAME}}:$GITHUB_SHA"
141+
env:
142+
image_id: ${{ steps.push.outputs.imageid }}
143+
image_tag: ${{ steps.meta.outputs.tags }}
144144

145145
# This step generates an artifact attestation for the image,
146146
# which is an unforgeable statement about where and how it was

0 commit comments

Comments
 (0)