-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.63 KB
/
deploy.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
36
37
38
39
40
41
42
43
44
45
46
47
name: build and deploy
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build_deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}'
- name: Setup gcloud cli
uses: google-github-actions/setup-gcloud@v0
- name: Configure docker and install gcloud components
run: |
gcloud auth configure-docker --quiet
gcloud components install beta --quiet
- name: Build and Push
run: |
docker build -t gcr.io/tendermint/tendermint-backend:${GITHUB_SHA::8} .
docker tag gcr.io/tendermint/tendermint-backend:${GITHUB_SHA::8} gcr.io/tendermint/tendermint-backend:latest
docker push gcr.io/tendermint/tendermint-backend:${GITHUB_SHA::8}
docker push gcr.io/tendermint/tendermint-backend:latest
- name: Deploy to cloud run
run: gcloud beta run deploy tendermint-backend --quiet
--region us-east1
--platform managed
--allow-unauthenticated
--image gcr.io/tendermint/tendermint-backend:latest
--concurrency 80
--memory 128Mi
--cpu 1000m
--max-instances 3
--port 8080
--timeout 300s
--update-env-vars MESSARI_API_KEY=${{ secrets.MESSARI_API_KEY }},AIRTABLE_API_KEY=${{ secrets.AIRTABLE_API_KEY }},ALGOLIA_ADMIN_API_KEY=${{ secrets.ALGOLIA_ADMIN_API_KEY }},MAILERLITE_API_KEY=${{ secrets.MAILERLITE_API_KEY }}