Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

How do you test a GitHub Actions workflow change before merging?

BeginnerProductionGitHub Actions and GitLab CI in Production
Answer

Lint with actionlint, run on a branch (a push to a branch containing the workflow changes triggers it, and workflow_dispatch allows manual runs from that branch), use act for quick local runs of simple jobs, and for reusable workflows reference the branch ref (@my-branch) from a test repo. For deploy workflows, first point them at a sandbox environment.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production