-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 909 Bytes
/
push.yaml
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
name: deploy
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
# Setup.
- uses: actions/checkout@v3
# Run tests. Failure will abort deployment.
- name: go test
uses: cedrickring/[email protected]
# Auth for gcloud
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCLOUD_AUTH }}
# Setup gcloud command.
- uses: google-github-actions/setup-gcloud@v1
with:
version: '435.0.0'
# Build new deployable image.
- run: gcloud builds submit --tag gcr.io/gothrough/website
env:
CLOUDSDK_CORE_PROJECT: gothrough
# Deploy new image.
- run: gcloud --quiet run deploy --image gcr.io/gothrough/website --allow-unauthenticated --region=us-central1 --timeout=32s website --platform=managed --memory=2Gi
env:
CLOUDSDK_CORE_PROJECT: gothrough