Skip to content

Hide env and env groups for static on the GitHub page#213

Merged
acoshift merged 1 commit into
mainfrom
github-static-hide-env
Jun 14, 2026
Merged

Hide env and env groups for static on the GitHub page#213
acoshift merged 1 commit into
mainfrom
github-static-hide-env

Conversation

@acoshift

Copy link
Copy Markdown
Member

What

On the GitHub workflow-generator page, when build type = Static, hide the Environment variables and Env groups inputs, and omit them from the generated workflow YAML.

Why

Static deployments serve a release from the edge and have no pod, so env vars and env groups don't apply — the apiserver zeroes Env/EnvGroups for static deployments. Showing the inputs (and emitting them into the workflow) is misleading and would be ignored/rejected downstream. This matches how the detail page already hides env/envGroups for static.

How

  • Wrapped the env / env-group / pull-secret grid in a single {#if gen.buildType === 'dockerfile'} guard, folding in the pull-secret block's existing identical conditional (so all three container-only fields share one guard).
  • Gated the env / envGroups lines in withBlock() on buildType === 'dockerfile' so they never leak into the generated YAML even if values were typed before switching to Static. workingDirectory stays (it applies to static builds too).

Most of the diff is re-indentation from un-nesting the pull-secret block; the behavioral change is the two guards.

bun lint and bun check pass clean.

🤖 Generated with Claude Code

Static deployments serve a release from the edge and have no pod, so
env vars and env groups don't apply (the apiserver zeroes them for
static). On the GitHub workflow generator, hide the env/env-group inputs
when build type is Static and omit them from the generated workflow YAML.

Done by wrapping the env/env-group/pull-secret grid in a single
buildType==='dockerfile' guard (folding in the existing pull-secret
conditional) and gating the env/envGroups lines in withBlock().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying deploys-app--console with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0bd2412
Status: ✅  Deploy successful!
Preview URL: https://2bb86150.deploys-app--console.pages.dev
Branch Preview URL: https://github-static-hide-env.deploys-app--console.pages.dev

View logs

@acoshift acoshift merged commit f1787f3 into main Jun 14, 2026
5 checks passed
@acoshift acoshift deleted the github-static-hide-env branch June 14, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant