-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 954 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Deploy
on:
push:
branches:
- gcp
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: 'actions/checkout@v4'
- name: Prepare environment
env:
Dotenv: ${{ secrets.DOTENV_ME }}
run: |
echo "DOTENV_ME=$Dotenv" > .env.me
yarn
yarn dotenv-vault pull
yarn dotenv-vault pull production
yarn ts-node scripts/merge-envs.ts
- uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS_JSON }}'
- name: 'build'
run: gcloud builds submit --config cloudbuild.yaml .
- name: 'run'
run: gcloud run deploy crew --image europe-west1-docker.pkg.dev/gmail-reminder-api/cloud-run-source-deploy/crew:latest --env-vars-file ./.env.json --region europe-west1 --allow-unauthenticated