Interview Prep/GitHub Actions/Pipeline Design & Triggers

Your company forbids deploys on Friday after 16:00 and during incidents. How do you enforce it?

AdvancedScenarioPipeline Design & Triggers
Answer

Situation read → Policy that must not depend on YAML in every repo.

What I'd do →

  1. Use a custom deployment protection rule (a GitHub App) on the prod environment that checks the change calendar and the incident tool API, then approves or rejects.
  2. As a lighter option, a required first step in the shared reusable deploy workflow that checks the window and fails with a clear message, with a force input that requires an extra environment (prod-emergency) with senior approvers.
  3. Log every override to the summary and Slack.

Why → Environment-level rules apply to every workflow that targets prod and cannot be removed by editing one repo's YAML.

Interview tip → Always include a documented break-glass path; freezes without one get bypassed badly.

All GitHub Actions questions Roadmap: GitHub Actions

More on Pipeline Design & Triggers