-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.06 KB
/
Copy pathclouddeploy-release.yaml
File metadata and controls
38 lines (33 loc) · 1.06 KB
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
name: clouddeploy-create-release
on:
push:
branches:
- main
permissions:
contents: 'read'
id-token: 'write'
jobs:
clouddeploy-create-release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudrun-with-tf
steps:
# https://github.com/google-github-actions/setup-gcloud/blob/main/example-workflows/cloud-run/cloud-run.yml
- name: Checkout
uses: actions/checkout@v3
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: "${{ secrets.GCP_CREDENTIALS }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: Create release that is connected PR number
run: |-
gcloud deploy releases create release-${GITHUB_SHA::7} \
--project=${{ secrets.GCP_PROJECT_ID }} \
--delivery-pipeline=test-app-backend \
--region=us-central1 \
--images=my-app-image=gcr.io/cloudrun/hello \
--quiet