Skip to content

generate a workflow per component with its own path triggers #288

Description

@joshua-temple

Problem / why

GitHub Actions cannot path-filter per matrix leg (on.push.paths is workflow-global), so a
matrix over components would trigger every leg on any component's path change. F4 already emits
one orchestrate file per component; this issue drives each file's on.push.paths from that
component's triggers and gives each its own component-keyed concurrency group and scoped
setup / build / deploy / finalize jobs.

Scope

This PR does:

  • Drive each component file's on.push.paths from that component's triggers / paths
    (writeWorkflowTriggers), replacing the global GetAllTriggers collapse for multi-component
    manifests.
  • Emit a per-component concurrency group, replicating the proven pattern already used by
    internal/generate/external.go (a per-component key so distinct components never share a
    group).
  • Keep single-component output (the default collapse) byte-identical.

This PR does NOT:

  • Change promotion workflows (P2 handles per-component promote files).
  • Introduce cross-component ordering.

Files / areas touched

  • internal/generate/generator.go - per-component writeWorkflowTriggers / writeConcurrency.
  • internal/generate/command.go - wire component triggers into the per-component files.

Tests and coverage required

  • Generator unit tests: a two-component manifest emits two orchestrate files, each with its own
    on.push.paths and its own concurrency group.
  • A test that the single-component output is unchanged.
  • actionlint-clean assertion on the generated multi-component workflows.

Acceptance criteria

  • One orchestrate workflow file per component, each path-filtered to that component.
  • Each component has a distinct concurrency group.
  • Single-component output filenames and contents are unchanged and actionlint-clean.

Dependencies

Blocked by V1 and V2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions