Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into Develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronSosaRamos committed Dec 6, 2024
2 parents 6355299 + 67dff77 commit b452bee
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-cd-sandbox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to Cloud Run

env:
SERVICE_NAME: marvel-ai-backend-sandbox
PROJECT_ID: kai-platform-sandbox
DOCKER_IMAGE_URL: us-central1-docker.pkg.dev/kai-platform-sandbox/marvel-ai-backend-sandbox/marvel-ai-backend-sandbox

on:
push:
branches:
- Develop

jobs:
dockerize-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Google Cloud Auth
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.SANDBOX_CREDENTIALS }}'
project_id: ${{ env.PROJECT_ID }}

- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v2'

- name: Configure Docker
run: |
gcloud auth configure-docker us-central1-docker.pkg.dev
- name: Build and Push Docker Image
run: |
docker build -t ${{ env.DOCKER_IMAGE_URL }}:latest -f Dockerfile .
docker push ${{ env.DOCKER_IMAGE_URL }}:latest
- name: Deploy to Cloud Run
run: |
echo SERVICE_NAME $SERVICE_NAME
gcloud run deploy $SERVICE_NAME \
--image ${{ env.DOCKER_IMAGE_URL }}:latest \
--platform managed \
--region us-east1 \
--allow-unauthenticated

0 comments on commit b452bee

Please sign in to comment.