@@ -57,20 +57,21 @@ jobs:
5757
5858The action may be customized using the following optional inputs:
5959
60- | Name | Description | Default |
61- | :------------ | :-------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- |
62- | ` monorepo` | Enables [monorepo mode](#monorepo-mode) | `false` |
63- | `projects` | Custom projects configuration for [monorepo mode](#monorepo-mode) | none |
64- | `task` | Name of command to run Code PushUp per project in [monorepo mode](#monorepo-mode) | `code-pushup` |
65- | `token` | GitHub token for authorizing GitHub API requests | `${{ github.token }}` |
66- | `annotations` | Toggles if annotations should be created for relevant Code PushUp issues | `true` |
67- | `artifacts` | Toggles if artifacts will we uploaded/downloaded | `true` |
68- | `retention` | Artifact retention period in days | from repository settings |
69- | `directory` | Directory in which `code-pushup` should run | `process.cwd()` |
70- | `output` | Directory where reports will be created | `.code-pushup` |
71- | `config` | Path to config file (`--config` option) | see [`@code-pushup/cli` docs](https://github.com/code-pushup/cli/tree/main/packages/cli#configuration) |
72- | `silent` | Toggles if logs from Code PushUp CLI are printed | `false` |
73- | `bin` | Command for executing Code PushUp CLI | `npx --no-install code-pushup` |
60+ | Name | Description | Default |
61+ | :----------------- | :-------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- |
62+ | ` monorepo` | Enables [monorepo mode](#monorepo-mode) | `false` |
63+ | `projects` | Custom projects configuration for [monorepo mode](#monorepo-mode) | none |
64+ | `task` | Name of command to run Code PushUp per project in [monorepo mode](#monorepo-mode) | `code-pushup` |
65+ | `nxProjectsFilter` | CLI arguments used to filter Nx projects in [monorepo mode](#monorepo-mode) | `--with-target={task}` |
66+ | `token` | GitHub token for authorizing GitHub API requests | `${{ github.token }}` |
67+ | `annotations` | Toggles if annotations should be created for relevant Code PushUp issues | `true` |
68+ | `artifacts` | Toggles if artifacts will we uploaded/downloaded | `true` |
69+ | `retention` | Artifact retention period in days | from repository settings |
70+ | `directory` | Directory in which `code-pushup` should run | `process.cwd()` |
71+ | `output` | Directory where reports will be created | `.code-pushup` |
72+ | `config` | Path to config file (`--config` option) | see [`@code-pushup/cli` docs](https://github.com/code-pushup/cli/tree/main/packages/cli#configuration) |
73+ | `silent` | Toggles if logs from Code PushUp CLI are printed | `false` |
74+ | `bin` | Command for executing Code PushUp CLI | `npx --no-install code-pushup` |
7475
7576For example, this will run `code-pushup` commands in a non-root folder and
7677retain report artifacts for 30 days :
@@ -162,3 +163,19 @@ The `output` input supports interpolating the project name in the path using
162163 monorepo: true
163164 output: .code-pushup/{project}
164165` ` `
166+
167+ In Nx monorepos, projects are listed using
168+ ` nx show projects --with-target=code-pushup` by default. The `nxProjectsFilter`
169+ input sets the CLI arguments forwarded to
170+ [`nx show projects`](https://nx.dev/nx-api/nx/documents/show#projects) (default
171+ is `--with-target={task}`, with `{task}` being replaced by the `task` input
172+ value). This gives a lot of flexibility in customizing which Nx projects should
173+ be run :
174+
175+ ` ` ` yml
176+ - uses: code-pushup/github-action@v0
177+ with:
178+ monorepo: nx
179+ nxProjectsFilter:
180+ '--with-target=code-pushup --affected --projects=apps/* exclude=*-e2e'
181+ ` ` `
0 commit comments