Skip to content
$ lynuxpro

INTERVIEW PREP

Interview questions

570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.

Showing 1–8 of 8 questions

Learn GitHub & GitHub Actions →
1.How do you make jobs run in order?Mid

Use needs. A job with needs waits for the listed jobs to pass. Without it, jobs run in parallel.

2.How do you pass data between jobs?Mid

Declare outputs on the producing job, write them to $GITHUB_OUTPUT in a step, and read them in the next job with needs.<job>.outputs.<name>. For files, use artifacts.

3.What is the difference between secrets and variables?Mid

Secrets hold private values, are masked in logs and cannot be read back. Variables hold ordinary settings and are visible.

4.What does branch protection do and why does it matter?Mid

It sets rules for important branches: pull requests, approvals, passing checks and no force pushes. It keeps main safe and enforces your review process.

5.How does caching speed up a workflow?Mid

Dependencies are saved under a key, usually a hash of the lock file. When the key matches, they are restored instead of downloaded again.

6.When do you use a matrix?Mid

When the same job must run with several settings, like Node versions or operating systems. It creates one job per combination, running in parallel.

7.What is the difference between artifacts and cache?Mid

A cache speeds up repeated downloads and may be evicted. Artifacts are files from a run that you pass to other jobs or keep for download.

8.What is a merge conflict and how do you fix it?Mid

It happens when two branches changed the same lines, so Git cannot choose. Git marks the lines in the file. You keep the right version, remove the marker lines, then add and commit.