templates/actions/detect-changes.yml.tpl
Detect Changes Action Template
Generates a REUSABLE GitHub composite action that detects which domains have changed. Supports both Nx dependency graph analysis and path-based change detection.
Purpose
This action is configuration-driven and accepts domain definitions as JSON input, making it truly reusable across any project without regeneration:
- For Nx monorepos: Uses
nx show projects --affectedto leverage the dependency graph - For path-based projects: Uses path filters to detect which domains changed
- Automatically falls back to path-based detection if Nx is unavailable
Key Design Principle
Domains are passed as input, not hardcoded in the action. This allows the same action to work with any domain configuration without regeneration.
Generated Action Location
actions/detect-changes/action.yml
Functions
generate()
function generate(ctx): Promise<any>;
Defined in: templates/actions/detect-changes.yml.tpl.ts:340
Generator entry point for detect-changes composite action.
Generates the actions/detect-changes/action.yml file with configuration-driven
change detection logic. This action accepts domain configuration as input at runtime,
making it truly reusable without regeneration.
Important: This action no longer embeds domain configurations. Instead, it receives them as JSON input from the workflow, allowing the same action to work with any domain configuration.
Parameters
ctx
PinionContext & object
Pinion generator context (domains no longer needed in template)
Returns
Promise<any>
Updated context after file generation