Interview Prep/GitHub Actions/Secrets, OIDC & Environments

You need a job to read prod secrets for a read-only smoke test without creating deployment noise or approvals. Approach?

AdvancedScenarioSecrets, OIDC & Environments
Answer

Situation read → Environment use implies deployments and protection rules.

What I'd do →

  1. Create a separate environment prod-smoke with only the read-only secret and its own narrow role.
  2. Restrict its deployment branches to main.
  3. No reviewers, because the credential is read-only by design.

Why → Splitting by privilege keeps approvals meaningful where writes happen.

Interview tip → "Approvals guard write paths; read paths get narrow credentials instead."

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, OIDC & Environments