Skip to content

Commit 5f84ee9

Browse files
committed
feat: publish helm chart to helm.coder.com
1 parent b217f2c commit 5f84ee9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/release.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ permissions:
2020
contents: write
2121
# Necessary to push docker images to ghcr.io.
2222
packages: write
23+
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
24+
id-token: write
2325

2426
env:
2527
CODER_RELEASE: ${{ github.event.inputs.snapshot && 'false' || 'true' }}
@@ -166,6 +168,23 @@ jobs:
166168
./build/*.rpm
167169
env:
168170
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
169188
170189
- name: Upload artifacts to actions (if dry-run or snapshot)
171190
if: ${{ github.event.inputs.dry_run || github.event.inputs.snapshot }}

0 commit comments

Comments
 (0)