From 7ecfeb0a57b83c1fbfb21dd6212fbc8ff862e2f3 Mon Sep 17 00:00:00 2001 From: Alexis Lavaud Date: Sat, 2 Dec 2023 15:02:45 +0100 Subject: [PATCH] Deploys to Cloud Run --- .github/workflows/build.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98a4fcd5..cda18fe6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,20 +55,21 @@ jobs: name: frontend-data path: frontend/dist - - id: 'deploy' + - name: Build, tag and push container + id: build-image + uses: docker/build-push-action@v3 + with: + context: frontend/ + push: true + tags: | + europe-west9-docker.pkg.dev/magnetic-lore-402317/transcendence/frontend:${{ inputs.ref }} + + - name: 'Deploy to Cloud Run' + id: 'deploy' uses: 'google-github-actions/deploy-cloudrun@v1' with: - service: 'hello-cloud-run' - image: 'gcr.io/cloudrun/hello' + service: 'transcendence-frontend' + image: europe-west9-docker.pkg.dev/magnetic-lore-402317/transcendence/frontend:${{ inputs.ref }} - name: 'Use output' run: 'curl "${{ steps.deploy.outputs.url }}"' - - # - name: Build, tag and push container - # id: build-image - # uses: docker/build-push-action@v3 - # with: - # context: ${{ vars.code_directory }} - # push: true - # tags: | - # ${{ vars.REGION }}-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/${{ vars.ARTIFACT_REPO }}/${{ vars.SERVICE_NAME }}:${{ inputs.ref }}