Skip to content

Commit

Permalink
Slight changes to deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
siranipour committed Aug 18, 2024
1 parent 81eb7e4 commit 39b9780
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
env:
PROJECT_ID: t-pointer-430919-v3
SERVICE: sigpt-api
NAME: sigpt-api
GAR_LOCATION: europe-west2
REGION: europe-west2

Expand Down Expand Up @@ -50,16 +51,16 @@ jobs:
- name: Build and Push Container
run: |-
gcloud auth configure-docker "${{ env.GAR_LOCATION }}-docker.pkg.dev"
docker build -t "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/website:${{ github.sha }}" ./
docker push "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/website:${{ github.sha }}"
docker build -t "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.NAME }}:${{ github.sha }}" ./
docker push "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.NAME }}:${{ github.sha }}"
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: ${{ env.SERVICE }}
region: ${{ env.REGION }}
image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/website:${{ github.sha }}
image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.NAME }}:${{ github.sha }}
flags: '--port=8000 --allow-unauthenticated'

- name: Show Output
Expand Down

0 comments on commit 39b9780

Please sign in to comment.