-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (34 loc) · 976 Bytes
/
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
name: Deploy to Cloud Run
on:
push:
branches:
- main
# This ensures only one deployment job runs at a time
# If a second deployment is triggered, it will cancel the first one
concurrency:
group: deploy-to-cloud-run
cancel-in-progress: true
env:
PROJECT_ID: coder-labeler
jobs:
deploy:
runs-on: ubuntu-latest
environment: prod
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21" # Adjust this to your Go version
- name: Google Auth
id: auth
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- name: Set up Cloud SDK
uses: "google-github-actions/setup-gcloud@v1"
- name: Configure Docker
run: gcloud auth configure-docker us-central1-docker.pkg.dev
- name: Deploy using Makefile
run: make deploy