Skip to content

Commit

Permalink
adding docker container push to google artifact registry
Browse files Browse the repository at this point in the history
  • Loading branch information
langerae committed Sep 20, 2024
1 parent 9ac1c65 commit 5ec926d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/metocean-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ name: Docker Image CI

on:
push:
branches: [ "metocean-prod" ]
branches: [ "metocean-deploy-test" ]
pull_request:
branches: [ "metocean-prod" ]
branches: [ "metocean-deploy-test" ]

env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }} # TODO: update Google Cloud project id
Expand Down Expand Up @@ -82,6 +82,12 @@ jobs:
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: 'Build and Push Container'
run: |-
DOCKER_TAG="$${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}:latest"
docker build --tag "${DOCKER_TAG}" .
docker push "${DOCKER_TAG}"
# END - Docker auth and build

Expand Down

0 comments on commit 5ec926d

Please sign in to comment.