From c56da3e50ee2cf2c2612c9d5bcd7b2127331087c Mon Sep 17 00:00:00 2001 From: Zach Legesse Date: Sat, 26 Oct 2024 00:05:31 -0400 Subject: [PATCH] Update pipeline to move away from google cloud buil #49 --- .github/workflows/deploy.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9865275..564e0e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,8 @@ on: push: branches: - main +env: + REGION: us-central1 jobs: deploy: name: Deploy @@ -14,7 +16,11 @@ jobs: uses: "google-github-actions/auth@v2" with: credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" - - name: Build and Push Container Image - run: gcloud builds submit --region=us-central1 --tag ${{ secrets.CONTAINER_IMAGE_URL }} --project imaginate-439222 + - name: Configure Docker + run: gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet + - name: Build Docker Container + run: docker build . -t ${{ secrets.CONTAINER_IMAGE_URL }} + - name: Push Docker Container to Google Cloud + run: docker push ${{ secrets.CONTAINER_IMAGE_URL }} - name: Deploy to Google Cloud Run - run: gcloud run deploy imaginate-api --image ${{ secrets.CONTAINER_IMAGE_URL }} + run: gcloud run deploy imaginate-api --image ${{ secrets.CONTAINER_IMAGE_URL }} --region ${{ env.REGION }}