Compare

cigen vs tj-actions/changed-files

changed-files lists the files a pull request or push changed, for later steps to act on. cigen skips a whole job when its exact inputs already passed. How they differ and when to use each.

tj-actions/changed-filesChecked against its docs on 2026-12-04

tj-actions/changed-files is a general-purpose GitHub Action that tells later steps which files changed. It’s free, MIT licensed and actively maintained (v47.0.6 in April 2026). People use it to skip work by putting its outputs in if: conditions; what to skip is up to you. cigen makes one decision, whether a job needs to run, from whether the job’s exact inputs have passed before.

What changed-files does

# fragment
- uses: actions/checkout@v4
- id: changed
  uses: tj-actions/changed-files@<commit SHA>
  with:
    files: src/**
- if: steps.changed.outputs.any_changed == 'true'
  run: make test

Its README lists what it does: changed files between a pull request and its target branch, or since the last pushed commit; changed directories; JSON output to build a matrix from changed paths; glob filters with negation; output to files; Git’s diff or GitHub’s API; merge queue support; and Linux, macOS and Windows runners (README).

Where changed-files is the better choice

  • It gives you the files themselves: lint only changed files, build a matrix with one job per changed package, or pass the list to a script. cigen doesn’t pick files or tests inside a job, and doesn’t plan to.
  • It’s one step in the workflow you already have, with nothing stored between runs.
  • Any condition you can write in an if: can use its outputs.

Where cigen is safer

  • On a push, changed-files compares with the preceding commit. If the previous run failed or was cancelled and the next commit doesn’t touch the matched files, the guarded steps skip and the job ends green. cigen records a pass only when a job succeeds, so a failure is retried until it passes.
  • The file list is hand-written, and a job’s result also depends on its scripts, the lockfile, the toolchain pin and the workflow itself. cigen adds those to the job’s hash on its own (derived inputs); with changed-files, every one you forget is a change that skips the test.
  • When the test step’s if: is false, the job succeeds. If it’s a required check, it passes without testing anything. That’s right when the list is complete and wrong when it isn’t.

Security: pin actions to a commit

In March 2025 changed-files was compromised: its version tags were moved to a commit that exposed CI secrets in workflow logs (NVD). CISA tracked it as CVE-2025-30066, asked users to audit runs between 12 and 15 March 2025 and rotate any exposed secrets, and noted the fix in v46.0.1 (CISA alert). The project’s README now pins its own examples to a full commit SHA. Whatever you use to skip work, pin third-party actions to commit SHAs: a tag can be moved.

cigen’s own modules emit only actions pinned to commit SHAs, and the install step checks the downloaded binary against its release checksum. That checksum comes from the same release, so it catches a corrupt download, not a replaced release (install).

The same job in cigen

# cigen.yml
provider: github
workflows:
  ci:
    github:
      on:
        pull_request: {}
        push: { branches: [main] }
    jobs:
      test:
        image: ubuntu-latest
        inputs: 'src/**'
        steps:
          - run: make test

When to pick which

  • changed-files: when later steps need the list of files or directories (linting changed files, a matrix per package); when a step, not a whole job, should be conditional.
  • cigen: when the decision is “does this job need to run at all”, the job is a required check, and its inputs reach beyond the files you’d think to list.

What cigen can’t do yet

cigen is being rebuilt in the open. On GitHub Actions a skipped job still takes a runner and a checkout until the planned planner job exists. Pass records live in the GitHub Actions cache: scoped by branch and expired after 7 days unused. The release install step needs v0.2.0, which isn’t out yet. See the roadmap.