Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ name: Release
# required reviewers)
# manual -> build only (workflow_dispatch)
#
# Required GitHub Environment secrets:
# Deploys are OFF until a cluster exists. To enable, set the repository
# variable DEPLOY_ENABLED=true (Settings -> Secrets and variables -> Actions ->
# Variables) and add the per-environment secret:
# staging / production: KUBE_CONFIG (base64-encoded kubeconfig for the cluster)
# Images push to GHCR using the built-in GITHUB_TOKEN (packages: write).
# Until then the deploy jobs are skipped and this workflow only builds + pushes
# images to GHCR (using the built-in GITHUB_TOKEN, packages: write).

on:
push:
Expand Down Expand Up @@ -78,7 +81,7 @@ jobs:
deploy-staging:
name: Deploy to staging
needs: images
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && vars.DEPLOY_ENABLED == 'true'
runs-on: ubuntu-latest
environment: staging
steps:
Expand All @@ -92,7 +95,7 @@ jobs:
deploy-prod:
name: Deploy to production
needs: images
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v') && vars.DEPLOY_ENABLED == 'true'
runs-on: ubuntu-latest
environment: production
steps:
Expand Down
1 change: 1 addition & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ else comes from the chart defaults plus an optional committed overlay

| What | Where | Value |
|------|-------|-------|
| `DEPLOY_ENABLED` | Repository **variable** (Actions → Variables) | `true` to enable the deploy jobs; unset/anything else and they are skipped (the workflow still builds + pushes images) |
| `KUBE_CONFIG` | Environment secret on **staging** and **production** | base64-encoded kubeconfig for that cluster |
| Required reviewers | **production** environment protection rules | who approves prod deploys |
| Packages: write | repo default `GITHUB_TOKEN` | already granted in the workflow |
Expand Down
Loading