Skip to content

fixed constant name and removed unused parameter #5

fixed constant name and removed unused parameter

fixed constant name and removed unused parameter #5

name: Deployment to the Google Cloud Platform run service
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m venv venv
. venv/bin/activate
pip install black
- name: Run black
run: |
. venv/bin/activate
black --check .
deploy:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up GCP SDK
uses: google-github-actions/setup-gcloud@v1
- name: Configure Docker
run: |
gcloud auth configure-docker
- name: Build with Google Cloud Build
run: |
gcloud builds submit --tag gcr.io/${{ secrets.GCP_PROJECT_ID }}/raight-move-backend:$GITHUB_SHA
- name: Deploy to Cloud Run
run: |
gcloud run deploy raight-move-backend \
--image gcr.io/${{ secrets.GCP_PROJECT_ID }}/raight-move-backend:$GITHUB_SHA \
--platform managed \
--region ${{ secrets.GCP_REGION }} \
--allow-unauthenticated