File tree 1 file changed +19
-0
lines changed 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ permissions:
20
20
contents : write
21
21
# Necessary to push docker images to ghcr.io.
22
22
packages : write
23
+ # Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
24
+ id-token : write
23
25
24
26
env :
25
27
CODER_RELEASE : ${{ github.event.inputs.snapshot && 'false' || 'true' }}
@@ -166,6 +168,23 @@ jobs:
166
168
./build/*.rpm
167
169
env :
168
170
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
171
+ - name : Authenticate to Google Cloud
172
+ id : auth
173
+ uses : google-github-actions/auth@v0
174
+ with :
175
+ workload_identity_provider : ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
176
+ service_account : ${{ secrets.GCP_SERVICE_ACCOUNT }}
177
+ - name : Setup GCloud SDK
178
+ uses : ' google-github-actions/setup-gcloud@v0'
179
+ - name : Publish Helm Chart
180
+ run : |
181
+ version="$(./scripts/version.sh)"
182
+ mkdir -p build/helm
183
+ cp "build/coder_helm_${version}.tgz" build/helm
184
+ gsutil cp gs://helm.coder.com/v2/index.yaml build/helm/index.yaml
185
+ helm repo index build/helm --url https://helm.coder.com/v2 --merge build/helm/index.yaml
186
+ gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/coder_helm_${version}.tgz gs://helm.coder.com/v2
187
+ gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
169
188
170
189
- name : Upload artifacts to actions (if dry-run or snapshot)
171
190
if : ${{ github.event.inputs.dry_run || github.event.inputs.snapshot }}
You can’t perform that action at this time.
0 commit comments