File tree 1 file changed +17
-14
lines changed
1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change 1
- name : build
1
+ name : deploy
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- main
7
+
7
8
workflow_dispatch :
8
9
9
10
# Environment variables available to all jobs and steps in this workflow
14
15
RUN_SERVICE : ${{ secrets.RUN_SERVICE }}
15
16
16
17
jobs :
17
- setup-build- deploy :
18
- name : Setup, Build, and Deploy
18
+ deploy :
19
+ name : Deploy to CloudRun
19
20
runs-on : ubuntu-latest
20
21
21
22
steps :
22
23
- name : Checkout
23
- uses : actions/checkout@v1
24
+ uses : actions/checkout@v4
24
25
25
- # Setup gcloud CLI
26
- - uses : GoogleCloudPlatform/github-actions/setup-gcloud@master
26
+ - name : gcloud auth
27
+ id : ' auth'
28
+ uses : ' google-github-actions/auth@v2'
27
29
with :
28
- version : ' 275.0.0'
29
- service_account_email : ${{ secrets.GCP_SA_EMAIL }}
30
- service_account_key : ${{ secrets.GCP_SA_KEY }}
30
+ credentials_json : ' ${{ secrets.GCP_SA_KEY }}'
31
31
32
- # Configure gcloud CLI
33
- - name : gcloud Set up
34
- run : |
35
- gcloud config set project ${RUN_PROJECT}
32
+ # Setup gcloud CLI
33
+ - name : gcloud setup
34
+ uses : google-github-actions/setup-gcloud@v2
35
+
36
+ - name : gcloud docker-auth
37
+ run : gcloud auth configure-docker
36
38
37
39
# Build and push image to Google Container Registry
38
40
- name : Build
39
41
run : |
40
42
docker build \
41
43
--build-arg COMMIT=${GITHUB_SHA:0:7} \
42
44
--build-arg LASTMOD=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
43
- --tag gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA .
45
+ --tag gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA \
46
+ .
44
47
45
48
- name : GCloud auth to docker
46
49
run : |
You can’t perform that action at this time.
0 commit comments