File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 18
18
secrets :
19
19
SERVICE_ACCOUNT_KEY :
20
20
required : true
21
+ CUSTOM_VARS_LIST :
22
+ required : false
21
23
workflow_dispatch :
22
24
inputs :
23
25
repository :
@@ -90,11 +92,16 @@ jobs:
90
92
run : |
91
93
docker buildx build -t ${REGION}-docker.pkg.dev/${PROJECT_ID}/community/${IMAGE_NAME}:${GITHUB_SHA} --push .
92
94
95
+ # Setting verbosity to debug leads to printing custom variables in the pipeline logs.
96
+ # It might be possible to replace 'set-env-vars' to 'set-secrets' but it requires additional Service Account permissions.
93
97
- name : Deploy to Cloud Run
94
98
run : |
95
99
echo "[INFO] Set google project..."
96
100
gcloud config set project ${PROJECT_ID}
97
101
102
+ echo "[INFO] Escaping custom variables..."
103
+ export CUSTOM_VARS_LIST_ESCAPED=$(echo "${{ secrets.CUSTOM_VARS_LIST }}" | sed -E 's/"/\\"/g')
104
+
98
105
echo "[INFO] Deploy service..."
99
106
gcloud run deploy ${SERVICE} \
100
107
--platform gke \
@@ -105,8 +112,8 @@ jobs:
105
112
--min-instances 1 \
106
113
--memory ${SERVICE_MEMORY:-512Mi} \
107
114
--timeout 300 \
108
- --verbosity debug \
109
- --set-env-vars GITHUB_REPO=${GITHUB_REPO} \
115
+ --verbosity info \
116
+ --set-env-vars GITHUB_REPO=${GITHUB_REPO}${CUSTOM_VARS_LIST_ESCAPED:+,${CUSTOM_VARS_LIST_ESCAPED}} \
110
117
--image ${REGION}-docker.pkg.dev/${PROJECT_ID}/community/${IMAGE_NAME}:${GITHUB_SHA}
111
118
112
119
echo "[INFO] Create domain mappings..."
Original file line number Diff line number Diff line change 21
21
uses : intersystems-community/demo-deployment/.github/workflows/deployment.yml@master
22
22
with :
23
23
name : <name-of-demo>
24
+ # # Optional
25
+ # memory: 1Gi
26
+ # port: 8081
24
27
secrets :
25
28
SERVICE_ACCOUNT_KEY : ${{ secrets.SERVICE_ACCOUNT_KEY }}
29
+ # # Optional
30
+ # CUSTOM_VARS_LIST: "var1=${{ secrets.CUSTOM_VAR1 }},var2=value2,..."
26
31
```
You can’t perform that action at this time.
0 commit comments