forked from bootdotdev/learn-cicd-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (26 loc) · 785 Bytes
/
cd.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
on:
push:
branches: [main]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: setup go toolchain
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: build
run: ./scripts/buildprod.sh
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_JSON_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: 'Use gcloud CLI'
run: 'gcloud info'
- name: 'build and push to gcp artifact'
run: 'gcloud builds submit --tag us-central1-docker.pkg.dev/notely-434019/notely-ar-repo/notely:latest .'