Did you know? Research improves critical thinking skills.

GitHub Actions CI/CD Interview Questions & Answers

GitHub Actions CI/CD Interview Questions and Answers

GitHub Actions CI/CD Interview Questions and Answers

1. What is GitHub Actions?
GitHub Actions is a CI/CD tool that automates build, test and deployment workflows directly from GitHub repositories.
2. What is a workflow in GitHub Actions?
A workflow is an automated process defined in a YAML file inside .github/workflows folder.
3. What triggers a GitHub Actions workflow?
Events like push, pull_request, schedule and manual trigger (workflow_dispatch).
4. What is a job?
A job is a set of steps executed on a runner.
5. What is a step?
An individual task in a job such as running a command or action.
6. What is a runner?
A server that runs GitHub Actions jobs (GitHub-hosted or self-hosted).
7. What is an action?
A reusable unit of code that performs a specific task in a workflow.
8. Where are workflows stored?
In .github/workflows directory of the repository.
9. What is YAML?
A configuration language used to define workflows.
10. What is checkout action?
Action to clone repository code into runner.
11. What is build automation in GitHub Actions?
Automatically compiling or packaging code using workflow steps.
12. How do you run tests in GitHub Actions?
By adding test commands in workflow steps.
13. What is environment in GitHub Actions?
Logical group for deployments with secrets and approvals.
14. What are secrets in GitHub Actions?
Encrypted variables used to store sensitive data like API keys.
15. How do you use secrets in workflow?
Using ${{ secrets.SECRET_NAME }} syntax.
16. What is artifact in GitHub Actions?
Build output files stored and shared between jobs.
17. What is caching?
Storing dependencies to speed up workflow execution.
18. What is matrix strategy?
Run same job on multiple OS or versions in parallel.
19. What is workflow_dispatch?
Manual trigger for workflows.
20. What is scheduled workflow?
Workflow triggered using cron schedule.
21. What is CI in GitHub Actions?
Automatically building and testing code on push or pull request.
22. What is CD in GitHub Actions?
Automatically deploying code to servers or cloud.
23. How do you deploy using GitHub Actions?
Using deployment steps to cloud, Docker or Kubernetes.
24. What is branch filter?
Controls which branches trigger workflow.
25. What is pull_request trigger?
Runs workflow when PR is created or updated.
26. What is job dependency?
Using needs keyword to define job execution order.
27. What is reusable workflow?
Workflow that can be reused across repositories.
28. What is composite action?
Custom action created using multiple steps.
29. What is self-hosted runner?
Runner installed on your own server or VM.
30. What is GitHub-hosted runner?
Runner provided and managed by GitHub.
31. How do you handle approvals before production?
Using environments with required reviewers.
32. What is blue-green deployment in GitHub Actions?
Deploying to two environments and switching traffic.
33. What is canary deployment?
Deploying to small percentage of users first.
34. What is rollback in GitHub Actions?
Redeploying previous successful version.
35. How do you handle secrets securely?
Using GitHub Secrets and avoiding hardcoding.
36. What is DevSecOps in GitHub Actions?
Adding security scans in pipeline.
37. What is SAST in GitHub Actions?
Static security scan of source code.
38. What is DAST in GitHub Actions?
Security scan of running application.
39. What is idempotency?
Running same job multiple times gives same result.
40. Why use GitHub Actions for CI/CD?
It is integrated with GitHub, easy to use, scalable and secure.


Source: sureshtechlabs.com


Share this post:

WhatsApp Facebook Twitter Telegram