The question
.github/workflows/kubernetes/reusable-kubernetes-deploy.yml declares:
environment:
description: GitHub environment name. Use its protection rules to gate deploys.
required: false
type: string
default: ""
and the job uses environment: ${{ inputs.environment }}.
The intent is that leaving it empty means "no environment". This has not been verified. GitHub may instead treat an empty string as a request to create an environment literally named "", or reject it.
Why it matters
If an empty string is invalid, every caller who omits the input gets a confusing failure on their first run — the worst possible first impression of a workflow.
What to do
- Fork this repo
- Create a tiny caller workflow that uses the K8s workflow without passing
environment
- Run it and observe: does the job start? Does an environment appear under Settings → Environments?
- Report what you saw in a comment
- If it is broken, fix it — the usual approach is a separate job guarded by
if:, since environment cannot be conditionally omitted from a single job
Note
You do not need a real Kubernetes cluster. The job will fail at the kubeconfig step, but that is after the environment is resolved, so you will still learn what you need.
This is a genuinely useful contribution and a good way to learn how GitHub environments actually behave.
The question
.github/workflows/kubernetes/reusable-kubernetes-deploy.ymldeclares:and the job uses
environment: ${{ inputs.environment }}.The intent is that leaving it empty means "no environment". This has not been verified. GitHub may instead treat an empty string as a request to create an environment literally named
"", or reject it.Why it matters
If an empty string is invalid, every caller who omits the input gets a confusing failure on their first run — the worst possible first impression of a workflow.
What to do
environmentif:, sinceenvironmentcannot be conditionally omitted from a single jobNote
You do not need a real Kubernetes cluster. The job will fail at the kubeconfig step, but that is after the environment is resolved, so you will still learn what you need.
This is a genuinely useful contribution and a good way to learn how GitHub environments actually behave.