Skip to main content
InterviewHubPRO
HomeTracksSection 36: CI/CD & GitHub Actions (50 Qs)
Section 36 of 6450 Questions (1 Per Page)

CI/CD Pipelines & GitHub Actions Master Interview Bank

Continuous Integration & Continuous Delivery architectures, GitHub Actions workflows, matrix builds, composite actions, self-hosted runners, and OIDC.

Curriculum Roadmap & Learning Path

3 Stages
Tip: Click any stage card above to instantly filter the question bank to that topic.3 Connected Milestones
50 of 50 Qs

Part 1: CI/CD Fundamentals & GitHub Actions Core (Junior / Entry-Level)

12 Questions
1
Most AskedJuniorCode#State Management#Kubernetes

What is CI/CD and what are the differences between Continuous Integration, Continuous Delivery, and Continuous Deployment?

Continuous Integration (CI): The engineering practice of frequently committing code to a shared repository (multiple times a day), where • Continuous Delivery (CD): An extension of CI where code changes are automatically built, tested, and packaged into production-ready deployable.

2
Most AskedJuniorCode#Components#State Management

Explain the fundamental components of a GitHub Actions workflow.

GitHub Actions automation is defined in YAML files located inside .github/workflows/.: Workflows: Configured automated processes made of one or more jobs (e.g., ci.yml) • Events / Triggers (on): Specific activities that trigger the workflow (e.g., push, pull_request, schedule).

3
Most AskedJunior#State Management#CI/CD & DevOps

What workflow triggers (`on:`) are supported by GitHub Actions?

GitHub Actions can trigger workflows on repository webhooks, manual triggers, and time-based schedules: push: Triggered on code pushes to specific branches or tags • pullrequest: Triggered when PRs are opened, synchronized, or reopened • workflowdispatch: Adds a manual "Run workflow" button in the GitHub UI with customizable input fields.

4
Most AskedJunior#State Management#CI/CD & DevOps

What is the difference between GitHub-Hosted Runners and Self-Hosted Runners?

Dimension GitHub-Hosted Runners Self-Hosted Runners.

5
Most AskedJuniorCode#State Management#CI/CD & DevOps

How are secrets and environment variables managed securely?

Repository Secrets: Encrypted values stored at the repository or organization level (e.g., API keys, deployment tokens) • Environment Secrets: Scoped to specific environments (e.g. production, staging) • GITHUB_TOKEN: A short-lived token automatically provisioned for each job.

6
Most AskedJuniorCode#State Management#CI/CD & DevOps

How does caching work in GitHub Actions?

Downloading dependencies (like node_modules or .m2) from scratch on every run consumes network bandwidth and slows CI down.: actions/setup- Built-In Cache: Built-in caching flags (cache: 'npm', cache: 'pip', cache: 'maven') are recommended for standard language setups.

7
Most AskedJunior#State Management#CI/CD & DevOps

What is the difference between Artifacts and Caches?

Cache (actions/cache): Reusable files intended to speed up future workflow runs (e.g. package managers, intermediate build objects) • Artifacts (upload-artifact / download-artifact): Permanent or long-lived deliverables produced by a workflow (e.g. compiled binaries, APKs, test.

8
Most AskedJuniorCode#State Management#CI/CD & DevOps

How do conditional execution and status checks work?

The if: keyword evaluates boolean expressions to skip or execute specific steps or entire jobs.: success(): True if all previous steps succeeded (default) • always(): Forces the step to execute even if prior steps failed or were cancelled (vital for cleanup or sending Slack notifications).

9
Most AskedJunior#State Management#CI/CD & DevOps

What are GitHub Contexts and Expressions?

Contexts are structured JSON objects containing information about workflow runs, runner environments, secrets, and repository state. They are accessed using the ${{ }} syntax: github: Metadata about the run (github.sha, github.actor, github.ref, github.event_name).

10
Most AskedJunior#State Management#Kubernetes

What are GitHub Environments and Deployment Protection Rules?

Environments model deployment targets (e.g., development, staging, production). They provide enterprise governance controls: Required Reviewers: High-risk deployments (like production) pause until designated leads or DevOps managers manually approve the release.

11
Most AskedJunior#State Management#CI/CD & DevOps

What is the difference between Composite Actions and Reusable Workflows?

Both promote DRY (Don't Repeat Yourself) automation across repositories: Composite Action: Combines multiple shell steps into a single reusable action (action.yml) • Reusable Workflow (workflow_call): An entire standalone workflow (.github/workflows/*.yml) containing multiple jobs, its own runner.

12
Most AskedJunior#State Management#CI/CD & DevOps

How do Merge Queues and Required Status Checks safeguard the `main` branch?

Required Status Checks: Ensure PRs cannot be merged until designated CI jobs (e.g. test, security-scan) report green status • Merge Queue: Solves the race condition where two developers merge branches that passed tests independently, but break when combined on main.

Part 2: Advanced Workflows, Security & Containerization (Mid-Level)

12 Questions
13
MidCode#Security & Auth#Docker & Containers

How do Matrix Builds work and how do you customize them?

A matrix strategy spawns multiple jobs in parallel across combinations of operating systems, language versions, and environments.

14
SeniorCode#Security & Auth#Docker & Containers

What is Concurrency Control and why is `cancel-in-progress` crucial?

When a developer pushes 5 rapid commits to a pull request, running 5 full CI pipelines wastes compute minutes and runner slots. concurrency groups workflows by branch or PR ID. Setting cancel-in-progress: true automatically aborts obsolete running pipelines the moment a newer commit arrives!

15
MidCode#Security & Auth#Docker & Containers

How does Keyless Cloud Authentication work with OpenID Connect (OIDC)?

Traditionally, CI pipelines needed hardcoded, long-lived AWS IAM access keys stored in GitHub Secrets. If leaked, attackers gained persistent cloud access. With OIDC, GitHub acts as an Identity Provider (IdP): The GitHub Runner requests a short-lived JSON Web Token (JWT) from GitHub's OIDC provider.

16
MidCode#Security & Auth#Docker & Containers

How do you run Containerized Jobs and Service Containers?

container: forces the entire job to execute inside a specified Docker image rather than the host VM • services: provisions isolated background containers (PostgreSQL, Redis, RabbitMQ) networked to the job container via localhost.

17
JuniorCode#State Management#TypeScript

How do you create Custom JavaScript / TypeScript Actions?

Custom actions allow encapsulating complex pipeline automation: Define metadata in action.yml (inputs, outputs, entrypoint) • Write logic in TypeScript using @actions/core and @actions/github • Compile using @vercel/ncc to bundle all dependencies into a single dist/index.js file.

18
Mid#Pipes#Security & Auth

How do you protect CI pipelines against Supply-Chain Attacks?

Third-party actions can be compromised or hijacked (e.g. tag mutation of @v1).: Commit SHA Pinning: Reference actions by immutable Git commit SHA instead of mutable tags (uses • Dependabot for Actions: Automatically create PRs to update pinned SHAs when upstream releases new versions.

19
MidCode#Security & Auth#Docker & Containers

How do you generate dynamic job matrices programmatically?

When testing a monorepo, you only want to run jobs for microservices that actually changed. You can execute a discovery job that outputs a JSON array, and pass it dynamically to the matrix of a downstream job.

20
Most AskedJunior#State Management#Security & Auth

What is Actions Runner Controller (ARC) on Kubernetes?

Actions Runner Controller (ARC) is a Kubernetes operator that dynamically orchestrates and autoscales self-hosted GitHub Actions runners inside a Kubernetes cluster.: When jobs queue up in GitHub, ARC provisions ephemeral runner pods instantly.

21
Most AskedMidCode#Forms#Security & Auth

How do you build multi-platform Docker images with Buildx and registry caching?

Production servers run on both x86_64 (Intel/AMD) and arm64 (AWS Graviton, Apple Silicon). Docker Buildx and QEMU build multi-architecture container images concurrently and push them to container registries with GitHub Actions cache backends (type=gha).

22
Most AskedSenior#Security & Auth#Docker & Containers

How do you structure CI/CD for Monorepos?

In monorepos containing 20+ packages, rebuilding every application on every commit wastes massive amounts of time.: Path Filtering (paths:): Trigger workflows only when relevant subdirectories change (paths: ['services/payment/**']).

23
Junior#Security & Auth#Docker & Containers

What is Semantic Release and automated changelog generation?

Semantic Release inspects standardized commit messages (Conventional Commits: fix:, feat:, BREAKING CHANGE:) on the main branch to automatically: Determine the next SemVer version (1.2.3 -> 1.3.0) • Generate CHANGELOG.md with categorized release notes.

24
Most AskedJunior#Security & Auth#Docker & Containers

What are the DORA Metrics and how does CI/CD optimize them?

The DevOps Research and Assessment (DORA) framework measures high-performing engineering organizations across four key metrics: Deployment Frequency: How often code is shipped to production (CI/CD increases this from monthly to multiple times a day).

Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)

26 Questions
25
Senior#Security & Auth

Why is the `pull_request_target` trigger a critical security risk?

The pullrequesttarget event runs in the context of the base repository (not the fork), granting it access to write tokens and repository secrets.

26
SeniorCode#Data Structures

What is SLSA and how do you achieve cryptographically signed provenance with Cosign?

SLSA (Supply Chain Levels for Software Artifacts) is a security framework that prevents tampering. Using Sigstore Cosign, your CI pipeline cryptographically signs container images and generates verifiable build attestations.

27
Senior#cicd#Enterprise Scale

How do you harden Self-Hosted Runners for enterprise network isolation?

If self-hosted runners run in your internal corporate network, arbitrary code from developer PRs could scan internal network subnets.: Egress Firewall Rules: Block private internal RFC 1918 subnets (10.0.0.0/8) except strictly allowed internal artifact repositories.

28
Senior#cicd#Enterprise Scale

How do you enforce Organization-Wide Governance and Rulesets?

Large enterprises cannot rely on individual repo owners to configure security checks properly.: GitHub Enterprise Repository Rulesets: Centrally enforce that all repositories require linear Git history, signed commits, and specific status.

29
Most AskedSenior#Forms#Performance

How do you optimize High-Performance Caching at scale?

When standard 10 GB GitHub Actions cache limits become a bottleneck for large multi-gigabyte C++ or Java enterprise builds: Deploy self-hosted cache servers using minIO (S3-compatible) or Google Cloud Storage • Utilize Docker BuildKit remote cache (type=registry,ref=org/app:cache,mode=max).

30
Senior#cicd#Enterprise Scale

How do you automate SOC2 / ISO 27001 Compliance Evidence Gathering?

Auditors require proof that: Every production release was tested • The pull request was approved by at least two independent engineers • No engineer bypassed branch protection rules.

31
SeniorCode#cicd#Enterprise Scale

What is an SBOM and how do you generate one in CI?

A Software Bill of Materials (SBOM) is a machine-readable inventory of every open-source library, transitive dependency, and compiler version inside your build artifact. Tools like syft or trivy generate SBOMs in SPDX or CycloneDX format, which are attached to releases for vulnerability tracking.

32
Most AskedSenior#Kubernetes#CI/CD & DevOps

How do you orchestrate Blue-Green and Canary Deployments in CI/CD?

Blue-Green: Deploy the new release to an inactive environment ("Green") • Canary: Shift 5% of production traffic to the new version.

33
Most AskedSenior#State Management#CI/CD & DevOps

How do you mitigate GitHub Actions Rate Limits and API Outages?

Requests to the GitHub API authenticated with GITHUB_TOKEN have an hourly limit of 1,000 requests per repository (Enterprise has higher) • Mitigation: Cache Docker images in private container registries (Amazon ECR / Google Artifact Registry) to avoid Docker Hub rate limits.

34
Most AskedSenior#Performance#Pipes

How do you implement CI/CD Observability and Pipeline Profiling?

Slow CI pipelines cost developer productivity.: GitHub Actions OpenTelemetry Exporter: Streams workflow durations, step latencies, and runner queue delays directly into Datadog, Honeycomb, or • Step Timing Metrics: Track which steps (linting, tests, docker build) take the most time to detect regressions before they compound.

35
Senior#State Management#CI/CD & DevOps

What is the architecture shift when migrating from Jenkins to GitHub Actions?

Jenkins GitHub Actions.

36
SeniorCode#State Management#CI/CD & DevOps

GitHub Actions Reusable Workflows vs Composite Actions: Key differences and selection criteria.

Reusable Workflows (workflow_call): Entire parameterized pipeline workflows defined in .github/workflows/ • Composite Actions (action.yml): Bundles multiple shell steps into a single reusable action within the same job/runner.

37
Most AskedSeniorCode#Pipes#CI/CD & DevOps

How do you manage Concurrency and prevent race conditions or duplicate runs in CI/CD pipelines?

When developers push multiple commits to the same pull request in rapid succession, running multiple pipelines simultaneously wastes runner minutes and can cause deploy race conditions. The concurrency block groups runs by branch or PR number and cancels obsolete in-flight runs using cancel-in-progress: true.

38
SeniorCode#State Management#CI/CD & DevOps

Secrets Masking and Redaction: How GitHub Actions protects sensitive data in logs and how to avoid accidental leaks.

GitHub Actions automatically masks any value registered as a secret in repository settings or set via ::add-mask:: by replacing occurrences with *** in execution logs.

39
SeniorCode#cicd#Enterprise Scale

Automated Release Management with Semantic Release and Conventional Commits.

Automated release pipelines inspect commit messages to determine the next Semantic Version (MAJOR.MINOR.PATCH), generate changelogs, tag Git repositories, and publish packages without human intervention.

40
SeniorCode#cicd#Enterprise Scale

Dynamic Matrix Strategies: How to generate matrix jobs dynamically from JSON outputs using expressions.

Instead of hardcoding matrix arrays in YAML, dynamic matrices compute the job list at runtime (e.g., finding all microservices modified in a pull request) and feed the JSON array into downstream parallel jobs.

41
Most AskedSeniorCode#Docker & Containers

Containerized CI Jobs: Running workflow jobs directly inside Docker containers (`jobs.<job_id>.container`).

Instead of installing language runtimes, libraries, and native C-bindings on the VM host runner, container: executes all steps inside a dedicated Docker image, guaranteeing absolute environment reproducibility.

42
Most AskedSenior#CI/CD & DevOps

Ephemeral Test Environments (Preview Environments / PR Environments) orchestration in CI/CD.

Ephemeral environments spin up an isolated, production-like copy of the frontend and microservices for each pull request. When the PR is closed or merged, the pipeline automatically destroys the infrastructure to eliminate cloud waste. Workflow Stages: PR Opened/Updated • Build container image tagged with PR commit SHA.

43
SeniorCode#Performance

Monorepo CI Optimization: Path filtering (`paths` / `paths-ignore`) vs tooling like Nx and Turborepo.

In repositories containing multiple frontend apps and backend microservices, running all tests on every commit causes multi-hour pipeline queues.: GitHub Actions Native paths Filter: Skips entire workflows if commits only touch unrelated directories.

44
SeniorCode#cicd#Enterprise Scale

Step Outputs vs Environment Files (`GITHUB_OUTPUT`, `GITHUB_ENV`, `GITHUB_STEP_SUMMARY`).

GitHub Actions transitioned from older stdout commands (::set-output, ::set-env) to secure file-based environment state passing.

45
SeniorCode#Security & Auth#Docker & Containers

Supply Chain Security with Cosign and Sigstore: Keyless signing and container provenance verification.

Supply chain attacks inject malware into dependencies or registries. Sigstore Cosign allows pipelines to sign container images using GitHub OIDC tokens (keyless signing). Downstream clusters verify signatures before permitting container deployment.

46
SeniorCode#cicd#Enterprise Scale

Handling Long-Running Tests: Test splitting, parallel test shards, and Flaky Test quarantine strategies.

When integration test suites exceed 30 minutes, developers stop running tests.: Parallel Sharding: Split the test suite across multiple identical parallel runners using GitHub matrix sharding.

47
Most AskedSenior#State Management#Kubernetes

GitHub Actions Self-Hosted Runners on Kubernetes with Actions Runner Controller (ARC): Architecture and Autoscaling.

Actions Runner Controller (ARC) is a Kubernetes operator that dynamically provisions ephemeral, isolated runner pods inside private cloud VPCs.: Security: Pods are destroyed immediately after job completion, preventing cross-build state contamination or secret theft.

48
SeniorCode#State Management#Pipes

Zero-Trust Access with HashiCorp Vault Integration in GitHub Actions pipelines.

Instead of storing static long-lived credentials in GitHub Secrets, GitHub Actions exchanges its ephemeral JWT token (id-token: write) with HashiCorp Vault via OIDC to retrieve dynamic, short-lived credentials (e.g. database passwords valid for 1 hour).

49
SeniorCode#Kubernetes

Deployment Protection Rules and Environment Approvals for multi-stage enterprise deployments.

GitHub Environments provide production safeguards: Required Reviewers: Deployments pause and trigger email/Slack notifications until specified senior engineers or team leads approve • Wait Timers: Delays deployment execution (e.g., wait 30 minutes in canary stage before proceeding to production).

50
Most AskedSenior#Kubernetes#CI/CD & DevOps

Designing a Disaster-Resilient Multi-Region CI/CD Deployment Architecture.

Enterprise production pipelines must safely roll out updates across globally distributed cloud regions (e.g. US-East, EU-Central, AP-Southeast) without risking global downtime. Architectural Stages: Stage 1 (Canary Region): Deploy to the lowest-traffic region (us-west-1).