Skip to content

Included CI-relevant paths in nx.json named inputs#27349

Closed
acburdine wants to merge 1 commit intoTryGhost:mainfrom
acburdine:ci/nx-cifiles
Closed

Included CI-relevant paths in nx.json named inputs#27349
acburdine wants to merge 1 commit intoTryGhost:mainfrom
acburdine:ci/nx-cifiles

Conversation

@acburdine
Copy link
Copy Markdown
Member

Summary

Adds filepaths for shared ci/other flows to default nx named inputs. This allows us to remove the dependency on the 'shared' filepath detection in the ci paths-filter and exclusively leverage nx affected to determine if builds should run

Why

Relates to #27348 - once we start to use nx affected to conditionally skip/trigger jobs, we will need some way to dictate to nx that changes to the .github/ folder should trigger reruns of packages in the workspace. Instead of looking at changes in all .github files however, I borrowed the list of relevant files from #27311 so things are a bit cleaner.

Potential Drawbacks

Because nx.json affects local development as well as CI runs, anytime the Github CI-related files are changed, it will also invalidate the local nx build cache.

no issue
Adds filepaths for shared ci/other flows to default nx named inputs. This allows us to remove the dependency on the 'shared' filepath detection in the ci paths-filter and exclusively leverage nx affected to determine if builds should run
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 40571847-f475-42d5-a811-058f88840cc4

📥 Commits

Reviewing files that changed from the base of the PR and between fe4ef54 and e6f75e8.

📒 Files selected for processing (1)
  • nx.json

Walkthrough

The namedInputs.default array in nx.json was expanded to include additional workspace-level configuration files and directories. Previously containing two input globs ({projectRoot}/**/* and {workspaceRoot}/ghost/tsconfig.json), the array now includes {workspaceRoot}/package.json, {workspaceRoot}/.github/workflows/**/*, {workspaceRoot}/.github/actions/**/*, {workspaceRoot}/.github/scripts/**/*, and {workspaceRoot}/.npmrc. The original inputs were retained. No other configuration sections in the file were modified.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: expanding nx.json's named inputs to include CI-relevant paths from .github/ and other workflow files.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose, motivation, and trade-offs of adding CI-relevant paths to nx.json's default named inputs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@acburdine acburdine requested a review from 9larsons April 11, 2026 18:34
@sonarqubecloud
Copy link
Copy Markdown

@acburdine
Copy link
Copy Markdown
Member Author

I also looked into whether it's possible to have a separate set of "named inputs" that are only taken into account in CI, but unfortunately it looks like the nx show projects command doesn't take into account the --configuration flag needed to make that work 🤔

@acburdine
Copy link
Copy Markdown
Member Author

hmm actually I think I can take the approach I did initially in #27202 and it'll work better than adding all of the github ci files to named inputs

@acburdine acburdine closed this Apr 11, 2026
@acburdine acburdine deleted the ci/nx-cifiles branch April 11, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant