tezvyn:

How would you implement conditional logic in a pipeline?

Source: docs.github.comintermediate

WHAT IT TESTS: Declarative stage gating without shell hacks. ANSWER OUTLINE: Use if conditions with contexts like github.ref, separate trigger filters from runtime conditions, and add env rules. RED FLAG: Shell if statements in a job, not native conditionals.

WHAT IT TESTS: Whether you can gate CI/CD stages using native declarative conditionals rather than fragile shell scripting. ANSWER OUTLINE: First, explain job-level if conditions using expression contexts such as github.ref or github.event_name; second, contrast trigger-level branch filters with runtime job conditions; third, mention environment protection rules and required reviewers as additional gates for production deploys.

Read the original → docs.github.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

How would you implement conditional logic in a pipeline? · Tezvyn