Changed Files

flightstack/changed-files@1.0.0 Step Verified

Check whether files matching path globs changed, so later steps can run only when they did.

Add it to a pipeline

jobs:
  - id: changed-files
    uses: flightstack/changed-files@1.0.0

Or drag it onto the canvas from the step palette in the visual editor. Pin an exact version for production pipelines.

Inputs

paths string
Globs that count as a change, one per line (or comma-separated), relative to the repository root. * matches within a folder, ** matches any depth, and a trailing / means the whole folder. Leave empty to count every file that is not ignored.
pathsIgnore string
Globs whose changes are ignored, one per line (or comma-separated).
base string default HEAD~1
Git ref to compare the checked-out commit against. HEAD~1 compares with the previous commit; use a branch such as origin/main to compare a feature branch or pull request with its target.
failWhenUnchanged boolean default false
Fail this step when no matching files changed, which stops the jobs that depend on it.

Outputs

changedboolean
True when at least one changed file matches the filters.
filesstring
Matching changed files, one per line.
countinteger
Number of matching changed files.