Chapter 90: GitHub Actions Deep Dive
90.11 Interview questions and revision
Interview cards
Interview questions
- Workflow vs job vs step? — File, a unit on one runner, and one command or action inside it.
- GitHub-hosted vs self-hosted runner? — Fresh managed VM vs your own machine you patch and secure.
- Name four triggers. — push, pull_request, workflow_dispatch, schedule.
- How do you run tests on many versions? — strategy.matrix.
- How do you stop two deploys racing? — A concurrency group.
- How do you add an approval? — An environment with required reviewers.
- How do you reach AWS without stored keys? — OIDC with id-token: write and an IAM role trusting your repo and branch.
- Cache vs artifact? — Cache speeds installs; artifacts hand results to other jobs or people.
- Reusable workflow vs composite action? — Whole jobs via workflow_call vs a bundle of steps.
- Actions vs Jenkins vs GitLab CI? — Choose by where code lives and who maintains the server.
Revision checklist
- [ ] I can explain workflow, job, step and runner.
- [ ] I can pick the right trigger and add a paths filter.
- [ ] I can use needs, matrix and concurrency.
- [ ] I can protect prod with an environment and reviewers.
- [ ] I know secrets vs vars and set permissions on top.
- [ ] I can explain OIDC to AWS in three steps.
- [ ] I can write a Node or Python test job and push an image only from main.
- [ ] I know reusable workflows and composite actions.
- [ ] I use cache for speed and artifacts for handover.
- [ ] I can compare Actions, Jenkins and GitLab CI fairly.
Quick quiz
Q1. Which permission must be set for OIDC?
id-token: write.
Q2. Which keyword makes a job wait for another?
needs.
Q3. Which chapter was the first GitHub Actions intro?
Chapter 9.
Ravindra Bagale's Tip
In interviews, draw the flow out loud: trigger, test matrix, build, approval, OIDC deploy. A clear flow beats a list of keywords.
Interview मध्ये flow बोलून दाखवा: trigger, test matrix, build, approval, OIDC deploy. Keywords च्या list पेक्षा clear flow भारी.
Interview में flow बोलकर दिखाओ: trigger, test matrix, build, approval, OIDC deploy. Keywords की list से clear flow बेहतर है.
In short
- A workflow has jobs; each job gets its own runner; steps run in order.
- Pick triggers on purpose and filter paths to save minutes.
- needs orders jobs, matrix fans out, concurrency stops races, environments add approvals.
- Use OIDC instead of stored cloud keys; set permissions at the top.
- Share YAML with reusable workflows and composite actions; use cache and artifacts well.
- Choose CI by where code lives and who maintains it.
Did you understand? Let us try it once more.