{"id":20923568,"url":"https://github.com/code-pushup/github-action","last_synced_at":"2025-10-07T12:30:11.144Z","repository":{"id":229028020,"uuid":"774979993","full_name":"code-pushup/github-action","owner":"code-pushup","description":"GitHub Action for automating feedback from Code PushUp","archived":false,"fork":false,"pushed_at":"2025-10-02T15:23:11.000Z","size":29621,"stargazers_count":5,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-02T17:34:42.069Z","etag":null,"topics":["analysis","conformance","continuous-integration","quality-control"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-pushup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-20T14:49:19.000Z","updated_at":"2025-08-29T15:00:34.000Z","dependencies_parsed_at":"2024-07-22T07:28:36.598Z","dependency_job_id":"85a234fb-e4b7-4c5c-b937-0649695fbe1d","html_url":"https://github.com/code-pushup/github-action","commit_stats":null,"previous_names":["code-pushup/github-action"],"tags_count":27,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/code-pushup/github-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-pushup%2Fgithub-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-pushup%2Fgithub-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-pushup%2Fgithub-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-pushup%2Fgithub-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-pushup","download_url":"https://codeload.github.com/code-pushup/github-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-pushup%2Fgithub-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278776807,"owners_count":26044099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","conformance","continuous-integration","quality-control"],"created_at":"2024-11-18T20:16:32.314Z","updated_at":"2025-10-07T12:30:11.138Z","avatar_url":"https://github.com/code-pushup.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code PushUp GitHub Action\n\n[![GitHub Super-Linter](https://github.com/actions/typescript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/actions/typescript-action/actions/workflows/ci.yml/badge.svg)\n[![Check dist/](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/check-dist.yml)\n[![CodeQL](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/actions/typescript-action/actions/workflows/codeql-analysis.yml)\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n\n**🤖 GitHub Action for integrating\n[Code PushUp](https://github.com/code-pushup/cli/tree/main/packages/cli#readme)\ninto your CI workflows.**\n\n![showcase](./images/showcase.png)\n\n## Features\n\n- 📃 Collects a Code PushUp report on push to remote branch.\n- 📉 Uploads reports to workflow artifacts and/or Code PushUp portal (optional).\n- 💬 When a PR is opened/updated, compares reports for source and target\n  branches, and creates/updates a PR comment which summarizes the impact of the\n  changes.\n  - ⚠️ Also annotates changed files with new issues encountered by Code PushUp.\n- 🏢 Supports monorepo setups - runs per project and summarizes comparisons in a\n  single PR comment.\n\n## Workflow example\n\n```yml\nname: Code PushUp\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\npermissions:\n  contents: read\n  actions: read\n  pull-requests: write\n\njobs:\n  code-pushup:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Clone repository\n        uses: actions/checkout@v4\n      - name: Set up Node.js\n        uses: actions/setup-node@v4\n      - name: Install dependencies\n        run: npm ci\n      - name: Code PushUp\n        uses: code-pushup/github-action@v0\n```\n\n## Action inputs\n\nThe action may be customized using the following optional inputs:\n\n| Name               | Description                                                                                                                                                                                  | Default                                                                                                |\n| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- |\n| `monorepo`         | Enables [monorepo mode](#monorepo-mode)                                                                                                                                                      | `false`                                                                                                |\n| `parallel`         | Configured parallel execution in [monorepo mode](#monorepo-mode)                                                                                                                             | `false`                                                                                                |\n| `projects`         | Custom projects configuration for [monorepo mode](#monorepo-mode)                                                                                                                            | none                                                                                                   |\n| `task`             | Name of command to run Code PushUp per project in [monorepo mode](#monorepo-mode)                                                                                                            | `code-pushup`                                                                                          |\n| `nxProjectsFilter` | CLI arguments used to filter Nx projects in [monorepo mode](#monorepo-mode)                                                                                                                  | `--with-target={task}`                                                                                 |\n| `configPatterns`   | Performance optimization for large monorepos, see [`@code-pushup/ci` docs](https://github.com/code-pushup/cli/blob/main/packages/ci/README.md#faster-ci-runs-with-configpatterns)            | `null`                                                                                                 |\n| `token`            | GitHub token for authorizing GitHub API requests                                                                                                                                             | `${{ github.token }}`                                                                                  |\n| `annotations`      | Toggles if annotations should be created for relevant Code PushUp issues                                                                                                                     | `true`                                                                                                 |\n| `artifacts`        | Toggles if artifacts will we uploaded/downloaded                                                                                                                                             | `true`                                                                                                 |\n| `skipComment`      | Toggles if comparison comment is posted to PR                                                                                                                                                | `false`                                                                                                |\n| `searchCommits`    | Extends previous report caching for portal users, see [`@code-pushup/ci` docs](https://github.com/code-pushup/cli/blob/main/packages/ci/README.md#search-latest-commits-for-previous-report) | `false`                                                                                                |\n| `retention`        | Artifact retention period in days                                                                                                                                                            | from repository settings                                                                               |\n| `directory`        | Directory in which `code-pushup` should run                                                                                                                                                  | `process.cwd()`                                                                                        |\n| `config`           | Path to config file (`--config` option)                                                                                                                                                      | see [`@code-pushup/cli` docs](https://github.com/code-pushup/cli/tree/main/packages/cli#configuration) |\n| `silent`           | Toggles if logs from Code PushUp CLI are printed                                                                                                                                             | `false`                                                                                                |\n| `bin`              | Command for executing Code PushUp CLI                                                                                                                                                        | `npx --no-install code-pushup`                                                                         |\n\nFor example, this will run `code-pushup` commands in a non-root folder and\nretain report artifacts for 30 days:\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    directory: website\n    retention: 30\n```\n\n## Action outputs\n\nSome outputs are set in case you want to add further steps to your workflow.\n\n| Name          | Description                                                             |\n| :------------ | :---------------------------------------------------------------------- |\n| `artifact-id` | ID of uploaded report artifact (N/A in [monorepo mode](#monorepo-mode)) |\n| `comment-id`  | ID of created/updated PR comment                                        |\n\nExample of using step outputs:\n\n```yml\n- uses: code-pushup/github-action@v0\n  id: code-pushup\n- run: |\n    echo \"Comment ID is ${{ steps.code-pushup.outputs.comment-id }}\"\n    echo \"Artifact ID is ${{ steps.code-pushup.outputs.artifact-id }}\"\n```\n\n## Authentication\n\nThe GitHub Action supports multiple authentication methods to integrate with\nyour CI workflows.\n\n### GitHub App authentication (recommended)\n\nFor the most seamless authentication experience, we recommend installing the\n[Code PushUp GitHub App](https://github.com/apps/code-pushup-staging).\n\nThe action automatically detects the GitHub App installation and uses it for\nenhanced API access. This provides better security through short-lived tokens\nand requires zero configuration on your part.\n\n### Default authentication\n\nIf the GitHub App is not installed, the action automatically uses the default\n`GITHUB_TOKEN` provided by GitHub Actions, which works perfectly for most use\ncases.\n\n### Custom authentication\n\nYou can provide your own token if you have specific requirements:\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    token: ${{ secrets.YOUR_PAT }}\n```\n\n## Monorepo mode\n\nBy default, the GitHub Action assumes your repository is a standalone project.\nBut it also supports monorepo setups where reports are collected and compared\nindividually per project. All project comparisons are then combined into a\nsingle PR comment.\n\nUse the `monorepo` input to active monorepo mode:\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    monorepo: true\n```\n\nThe GitHub Action will try to detect which monorepo tool you're using from the\nfile system. The following tools are supported out of the box:\n\n- [Nx](https://nx.dev/)\n- [Turborepo](https://turbo.build/)\n- [Yarn workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/)\n- [PNPM workspace](https://pnpm.io/workspaces)\n- [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces)\n\nIf you're using one of these tools, you can also skip auto-detection by setting\n`monorepo` input to `nx`, `turbo`, `yarn`, `pnpm` or `npm`.\n\nIf none of these tools are detected, then the fallback is to run Code PushUp in\nall folders which have a `package.json` file. If that's not what you want, then\nyou can also configure folder patterns using the optional `projects` input\n(comma-separated globs):\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    monorepo: true\n    projects: 'frontend, backend/*'\n```\n\nBased on which monorepo tool is used, Code PushUp CLI commands will be executed\nusing a `package.json` script, Nx target, Turbo task, or binary executable (as\nfallback). By default, these are expected to be called `code-pushup`, but you\ncan override the name using the optional `task` input:\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    monorepo: nx\n    task: analyze # custom Nx target\n```\n\nIn Nx monorepos, projects are listed using\n`nx show projects --with-target=code-pushup` by default. The `nxProjectsFilter`\ninput sets the CLI arguments forwarded to\n[`nx show projects`](https://nx.dev/nx-api/nx/documents/show#projects) (default\nis `--with-target={task}`, with `{task}` being replaced by the `task` input\nvalue). This gives a lot of flexibility in customizing which Nx projects should\nbe run:\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    monorepo: nx\n    nxProjectsFilter:\n      '--with-target=code-pushup --affected --projects=apps/* exclude=*-e2e'\n```\n\n### Parallel tasks\n\nBy default, tasks are run sequentially for each project in the monorepo. The\n`parallel` input enables parallel execution for tools which support it (Nx,\nTurborepo, PNPM, Yarn 2+).\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    monorepo: true\n    parallel: true\n```\n\nThe maximum number of concurrent tasks can be set by passing in a number instead\nof a boolean:\n\n```yml\n- uses: code-pushup/github-action@v0\n  with:\n    monorepo: true\n    parallel: 3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-pushup%2Fgithub-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-pushup%2Fgithub-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-pushup%2Fgithub-action/lists"}