-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 830 Bytes
/
deploy.yml
File metadata and controls
41 lines (31 loc) · 830 Bytes
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
name: build and deploy
on:
push:
branches:
- 'main'
jobs:
deploy:
runs-on: ubuntu-18.04
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v3'
- id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: 'configure docker'
run: |
gcloud auth configure-docker
- name: 'build'
run: |
docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/nodata:latest .
- name: 'push'
run: |
docker push gcr.io/${{ secrets.GCP_PROJECT_ID}}/nodata:latest
- name: 'deploy'
uses: 'google-github-actions/deploy-cloudrun@v0'
with:
service: 'nodata'
image: 'gcr.io/${{secrets.GCP_PROJECT_ID}}/nodata:latest'