deploy-registry #167
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-registry | |
on: | |
schedule: | |
# Runs at 02:30 UTC Monday through Friday | |
- cron: "30 2 * * 1-5" | |
push: | |
tags: | |
# Matches release/<namespace>/<resource_name>/<semantic_version> | |
# (e.g., "release/whizus/exoscale-zone/v1.0.13") | |
- "release/*/*/v*.*.*" | |
branches: # Templates get released when merged to main | |
- main | |
paths: | |
- ".github/workflows/deploy-registry.yaml" | |
- "registry/**/templates/**" | |
- "registry/**/README.md" | |
- ".icons/**" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
# Set id-token permission for gcloud | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Authenticate with Google Cloud | |
uses: google-github-actions/auth@b7593ed2efd1c1617e1b0254da33b86225adb2a5 | |
with: | |
workload_identity_provider: projects/309789351055/locations/global/workloadIdentityPools/github-actions/providers/github | |
service_account: [email protected] | |
- name: Set up Google Cloud SDK | |
uses: google-github-actions/setup-gcloud@cb1e50a9932213ecece00a606661ae9ca44f3397 | |
- name: Deploy to dev.registry.coder.com | |
run: gcloud builds triggers run 29818181-126d-4f8a-a937-f228b27d3d34 --branch main | |
- name: Deploy to registry.coder.com | |
run: gcloud builds triggers run 106610ff-41fb-4bd0-90a2-7643583fb9c0 --tag production |