Skip to content

removed debug print in Client_Credentials.py #29

removed debug print in Client_Credentials.py

removed debug print in Client_Credentials.py #29

name: Deployment
on:
push:
branches: [ "master" ]
env:
PROJECT_ID: gdcheerioscom
PROD_SERVICE: website-project
DEV_SERVICE: devgdcheerioscom
REGION: us-central1
jobs:
deploy-dev:
# Add 'id-token' with the intended permissions for workload identity federation
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
environment: development
env:
DEV_DB_HOSTNAME: ${{secrets.DB_HOSTNAME}}
DEV_DB_PASSWORD: ${{secrets.DB_PASSWORD}}
DEV_DB_USER: ${{secrets.DB_USER}}
DEV_DB: ${{secrets.DB}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Google Auth
id: auth
uses: 'google-github-actions/[email protected]'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Deploy dev to Cloud Run
id: deploy1
uses: google-github-actions/[email protected]
with:
service: ${{ env.DEV_SERVICE }}
region: ${{ env.REGION }}
# NOTE: If required, update to the appropriate source folder
source: ./
env_vars: |-
DOMAIN="https://dev.gdcheerios.com"
secrets: |-
DB_HOSTNAME=DEV_DB_HOSTNAME:latest
DB_PASSWORD=DEV_DB_PASSWORD:latest
DB_USER=DEV_DB_USER:latest
DB=DEV_DB:latest
OSU_API_KEY=OSU_API_KEY:latest
OSU_SECRET=OSU_SECRET:latest
CLIENT_ID=CLIENT_ID:latest
SECRET=SECRET:latest
# If required, use the Cloud Run url output in later steps
- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}
deploy-prod:
# Add 'id-token' with the intended permissions for workload identity federation
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
environment: Production
env:
PROD_DB_HOSTNAME: ${{secrets.DB_HOSTNAME}}
PROD_DB_PASSWORD: ${{secrets.DB_PASSWORD}}
PROD_DB_USER: ${{secrets.DB_USER}}
PROD_DB: ${{secrets.DB}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Google Auth
id: auth
uses: 'google-github-actions/[email protected]'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Deploy dev to Cloud Run
id: deploy1
uses: google-github-actions/[email protected]
with:
service: ${{ env.PROD_SERVICE }}
region: ${{ env.REGION }}
# NOTE: If required, update to the appropriate source folder
source: ./
env_vars: |-
DOMAIN="https://gdcheerios.com"
secrets: |-
DB_HOSTNAME=PROD_DB_HOSTNAME:latest
DB_PASSWORD=PROD_DB_PASSWORD:latest
DB_USER=PROD_DB_USER:latest
DB=PROD_DB:latest
OSU_API_KEY=OSU_API_KEY:latest
OSU_SECRET=OSU_SECRET:latest
CLIENT_ID=CLIENT_ID:latest
SECRET=SECRET:latest
# If required, use the Cloud Run url output in later steps
- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}