From 7c1747327e4ccbf1db5eff1b02e89003d698612a Mon Sep 17 00:00:00 2001 From: josehelps Date: Thu, 30 Nov 2023 20:48:43 -0500 Subject: [PATCH] adds beta deploy --- .github/workflows/beta-deploy.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/beta-deploy.yml diff --git a/.github/workflows/beta-deploy.yml b/.github/workflows/beta-deploy.yml new file mode 100644 index 0000000..e9a29a9 --- /dev/null +++ b/.github/workflows/beta-deploy.yml @@ -0,0 +1,36 @@ +name: Deploy + +on: + push: + branches: + - beta + +env: + SERVICE_NAME: beta-sigconverter + IMAGE_NAME: beta.sigconverter.io + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Google Cloud SDK + uses: google-github-actions/setup-gcloud@v0.2.1 + with: + project_id: ${{ secrets.PROJECT_ID }} + service_account_key: ${{ secrets.GCLOUD_AUTH }} + + - name: Configure Docker + run: gcloud auth configure-docker + + - name: Build Docker image + run: docker build -t ${{ env.IMAGE_NAME }} . + + - name: Push Docker image to Google Container Registry + run: gcloud builds submit --tag gcr.io/${{ secrets.PROJECT_ID }}/${{ env.IMAGE_NAME }} + + - name: Deploy to Google Cloud Run + run: gcloud run deploy ${{ env.SERVICE_NAME }} --image gcr.io/${{ secrets.PROJECT_ID }}/${{ env.IMAGE_NAME }} --platform managed --region us-central1