Deploy Pipeline #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Pipeline | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
env: | |
REGION: us-central1 | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Authenticate to Google Cloud | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" | |
- 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 }} --region ${{ env.REGION }} |