Skip to content

Merge pull request #137 from GeeksHacking/feature/rating #35

Merge pull request #137 from GeeksHacking/feature/rating

Merge pull request #137 from GeeksHacking/feature/rating #35

Workflow file for this run

name: Cloud Run Deployment
on:
push:
branches: [ main ]
jobs:
deploy:
name: Deployment
runs-on: ubuntu-latest
env:
IMAGE_NAME: gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_APP_NAME }}
steps:
- name: Login
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_EMAIL }}
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
- name: Configure Project
run: gcloud config set project ${{ secrets.GCP_PROJECT_ID }}
- name: Configure Docker
run: gcloud auth configure-docker --quiet
- name: Checkout repository
uses: actions/checkout@v2
- name: Inject .env File
run: |
echo "${{ secrets.BACKEND_ENV }}" >> .env
- name: Build Docker image
run: docker build . -t ${{ secrets.GCR_REPO }}
- name: Push Docker image
run: docker push ${{ secrets.GCR_REPO }}
- name: Deploy Docker image
run: gcloud run deploy projmatch-main --image ${{ secrets.GCR_REPO }} --region asia-east1 --platform managed