Interview Prep/GitHub Actions/Reuse at Scale: Reusable Workflows & Actions

Your JavaScript action's `dist/` in a PR does not match the source. How do you prevent shipping stale bundles?

IntermediateScenarioReuse at Scale: Reusable Workflows & Actions
Answer

Situation read → Source and committed bundle drift.

What I'd do →

  1. CI job: npm ci && npm run build && git diff --exit-code dist/.
  2. Optionally regenerate dist/ in a release workflow instead of by hand.
  3. Review dist/ diffs in PRs from outside contributors carefully; that is where malicious code hides.

Why → The runner executes dist/, not src/.

Interview tip → Mention the supply-chain angle of reviewing bundled code.

All GitHub Actions questions Roadmap: GitHub Actions

More on Reuse at Scale: Reusable Workflows & Actions