workflow-embedded-program
GitHub workflow run: embeds procedural logic
Why
Procedural programs embedded in run scalars are difficult to exercise locally and move business or validation behavior into GitHub-specific YAML instead of a tested repository-owned entrypoint. Repeating this pattern across component-specific workflows makes the Actions surface noisy. Workflows should select events, permissions, and stable commands—not implement programs.
Fix
Move the control flow or inline interpreter source into a tested repository-owned script, Make target, or package command. Invoke that entrypoint from an existing shared workflow when it already owns the component; add a distinct workflow only for a genuinely distinct trigger or delivery boundary.
Examples
jobs: test: steps: - run: | for package in api worker; do make test-package PACKAGE="$package" donejobs: test: steps: - run: | if make probe; then make test else echo 'not applicable' fiFiles
.github/workflows/*.{yaml,yml}