-
Notifications
You must be signed in to change notification settings - Fork 41
45 lines (40 loc) · 1.37 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
# .github/workflows/deploy.yml
name: Deploy 🚀 Thermal Comfort Tool to Google Cloud Run (☁🏃)
on:
push:
branches:
- master
jobs:
deploy:
name: Deploying 🚀 CBE Comfort Tool
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'bump version')"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Export gcloud related env variable
run: export CLOUDSDK_PYTHON="/usr/bin/python3"
# Build and push image to Google Container Registry
- name: Setting up
uses: google-github-actions/setup-gcloud@v0
with:
version: '318.0.0'
service_account_key: ${{ secrets.GCP_SA_KEY_JSON }}
service_account_email: "[email protected]"
project_id: comfort-327718
- name: Building (🏗️)
run: |-
gcloud builds submit --tag gcr.io/comfort-327718/comfort-tool
# Setup gcloud CLI
- name: Deploy (🚀)
uses: google-github-actions/deploy-cloudrun@main
with:
service: comfort-tool
image: gcr.io/comfort-327718/comfort-tool
region: us-central1
credentials: ${{ secrets.GCP_SA_KEY_JSON }}
project_id: comfort-327718