{"id":15020099,"url":"https://github.com/relative-ci/agent-action","last_synced_at":"2026-01-04T20:12:50.888Z","repository":{"id":37828344,"uuid":"398376354","full_name":"relative-ci/agent-action","owner":"relative-ci","description":"GitHub action that sends bundle stats and CI build information to RelativeCI","archived":false,"fork":false,"pushed_at":"2024-11-25T22:15:51.000Z","size":66029,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T04:51:26.363Z","etag":null,"topics":["bundle-analyzer","bundle-size","bundle-stats","bundlesize","github-action","webpack","webpack-analyzer"],"latest_commit_sha":null,"homepage":"https://relative-ci.com/documentation/setup","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relative-ci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-20T19:06:41.000Z","updated_at":"2024-11-25T22:10:36.000Z","dependencies_parsed_at":"2024-03-13T22:23:00.681Z","dependency_job_id":"e901c1fd-2faa-466b-8dd2-e8b9a4ff4e46","html_url":"https://github.com/relative-ci/agent-action","commit_stats":{"total_commits":110,"total_committers":2,"mean_commits":55.0,"dds":"0.027272727272727226","last_synced_commit":"87f731dcda883c5a65050a96f0a3d225fb790a45"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Fagent-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Fagent-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Fagent-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relative-ci%2Fagent-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relative-ci","download_url":"https://codeload.github.com/relative-ci/agent-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237920819,"owners_count":19387661,"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","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":["bundle-analyzer","bundle-size","bundle-stats","bundlesize","github-action","webpack","webpack-analyzer"],"created_at":"2024-09-24T19:54:35.368Z","updated_at":"2026-01-04T20:12:50.882Z","avatar_url":"https://github.com/relative-ci.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RelativeCI agent\n\nGitHub action that sends bundle stats and CI build information to [RelativeCI](https://relative-ci.com).\n\n- [RelativeCI Setup guide](https://relative-ci.com/documentation/setup)\n- [RelativeCI GitHub action guide](https://relative-ci.com/documentation/setup/agent/github-action)\n\n## Other agents\n\n- [CLI and webpack-plugin](https://github.com/relative-ci/agent)\n- [CircleCI orbit (soon)](https://github.com/relative-ci/roadmap/issues/46)\n\n---\n\n1. [Usage](#usage)\n  - [`push`/`pull_request` events](#pushpull_request-events)\n  - [`workflow_run` events](#workflow_run-events)\n2. [Inputs](#inputs)\n3. [Secrets](#secrets)\n\n## Usage\n\n[View action.yml](./action.yml)\n\n### `push`/`pull_request` events\n\n```yaml\n# .github/workflow/node.js.yml\nname: Node.js CI\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n\njobs:\n  build:\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 'latest'\n\n      # Install dependencies\n      - run: npm ci\n\n      # Build and output bundle stats\n      # Learn more: https://relative-ci.com/documentation/setup/agent/github-action#step-1-output-bundle-stats-json-file\n      - run: npm run build -- --json webpack-stats.json\n      \n      - name: Send bundle stats and build information to RelativeCI\n        uses: relative-ci/agent-action@v3\n        with:\n          key: ${{ secrets.RELATIVE_CI_KEY }}\n          token: ${{ secrets.GITHUB_TOKEN }}\n          webpackStatsFile: ./webpack-stats.json\n```\n\n### `workflow_run` events\n\n[Read more about workflows triggered by forked repositories](https://relative-ci.com/documentation/setup/agent/github-action/#workflow_run-event).\n\n#### Build and upload bundle stats artifacts using [relative-ci/agent-upload-artifact-action](https://github.com/relative-ci/agent-upload-artifact-action)\n\n```yaml\n# .github/workflows/build.yaml\nname: Build\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 'latest'\n\n      # Install dependencies\n      - run: npm ci\n\n      # Build and output bundle stats to webpack-stats.json\n      # Learn more: https://relative-ci.com/documentation/setup/agent/github-action#step-1-output-bundle-stats-json-file\n      - run: npm run build -- --json webpack-stats.json\n\n      # Upload webpack-stats.json to use on relative-ci.yaml workflow\n      - name: Upload bundle stats artifact\n        uses: relative-ci/agent-upload-artifact-action@v3\n        with:\n          webpackStatsFile: ./webpack-stats.json\n```\n\n### Send bundle stats and build information to RelativeCI \n\nThe workflow runs securely in the default branch context(ex: `main`). `relative-ci/agent-action` uses the build information (commit, message, branch) corresponding to the commit that triggerd the `Build` workflow.\n\n```yaml\n# .github/workflows/relative-ci.yaml\nname: RelativeCI\n\non:\n  workflow_run:\n    workflows: [\"Build\"]\n    types:\n      - completed\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Send bundle stats and build information to RelativeCI\n        uses: relative-ci/agent-action@v3.0.0-beta\n        with:\n          key: ${{ secrets.RELATIVE_CI_KEY }}\n          token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Inputs\n\n### `key`\n\n**Required** RelativeCI project key\n\n### `token`\n\nRequired only when running during `workflow_run` to download the bundle stats artifacts \nGitHub API key\n\n### `webpackStatsFile`\n\nRequired  when running during `push` or `pull_request` events\nPath to the bundle stats file\n\n### Optional\n\n#### `slug`\n\nDefault: [`GITHUB_REPOSITORY` evironment variable](https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables)\n\nYour project slug\n\n#### `includeCommitMessage`\n\nDefault: `true`\n\nFetch commit message from GitHub when the context commit is different that the commit that triggered the workflow (eg: `pull_request` event).\n\n#### `debug`\n\nDefault: `false`\n\nEnable debug output\n\n#### `compress`\n\nDefault: `false`\n\nCompress ingest data\n\n#### `artifactName`\n\nDefault: `relative-ci-artifacts` when running during `workflow_run` event\n\nThe name of the artifact that containts the bundle stats uploaded by the triggering workflow\n\n## Secrets\n\n### `RELATIVE_CI_KEY`\n\nYour RelativeCI project key\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelative-ci%2Fagent-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelative-ci%2Fagent-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelative-ci%2Fagent-action/lists"}