From de8c8dca10dc1a9a5edac9b45ce905ba6442e88e Mon Sep 17 00:00:00 2001 From: Christopher Schreiner Date: Thu, 22 Aug 2024 13:30:17 +0200 Subject: [PATCH] chore: deploy to google cloud --- .github/workflows/deploy.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b1fb9ba0..bdaa9892 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,3 +56,21 @@ jobs: tags: ${{ steps.meta-frontend.outputs.tags }} build-args: | BUILD_ENV=${{ fromJSON(steps.meta-frontend.outputs.json).labels['org.opencontainers.image.version'] == 'beta' && 'beta' || 'production' }} + + deploy-beta: + if: github.ref == 'refs/heads/beta' + needs: build + runs-on: ubuntu-latest + steps: + - uses: 'google-github-actions/auth@v2' + with: + service_account: ${{ secrets.GCP_SA_NAME }} + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Deploy to Google Cloud Run + uses: google-github-actions/deploy-cloudrun@main + with: + service: myanili-frontend-beta + image: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_IMAGE_FRONTEND }}:beta + region: europe-west1 + project_id: ${{ secrets.GCP_PROJECT_ID }}