{"id":51228967,"url":"https://github.com/usebruno/bruno-cli-action","last_synced_at":"2026-06-28T14:01:59.299Z","repository":{"id":308436331,"uuid":"842381566","full_name":"usebruno/bruno-cli-action","owner":"usebruno","description":"Bruno CLI Github Action Runner","archived":false,"fork":false,"pushed_at":"2026-06-09T13:12:11.000Z","size":15,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-09T15:12:22.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/usebruno.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":null,"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-08-14T08:31:59.000Z","updated_at":"2026-06-09T13:17:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"5642dd92-f869-4f77-a7f1-c3fd9eee250a","html_url":"https://github.com/usebruno/bruno-cli-action","commit_stats":null,"previous_names":["usebruno/bruno-run-action","usebruno/bruno-cli-action"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/usebruno/bruno-cli-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fbruno-cli-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fbruno-cli-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fbruno-cli-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fbruno-cli-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usebruno","download_url":"https://codeload.github.com/usebruno/bruno-cli-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usebruno%2Fbruno-cli-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34890795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"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":[],"created_at":"2026-06-28T14:01:56.545Z","updated_at":"2026-06-28T14:01:59.290Z","avatar_url":"https://github.com/usebruno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bruno CLI GitHub Action\n\nOfficial GitHub Action for running [Bruno CLI](https://docs.usebruno.com/bru-cli/overview) commands in CI/CD workflows with full support for collection runs and exposes machine-readable counts (`exit-code`, `passed`, `failed`, `total`, `duration-ms`) for downstream steps. \n\n- [Usage](#usage)\n- [Customize](#customize)\n  - [Inputs](#inputs)\n  - [Outputs](#outputs)\n  - [Behavior](#behavior)\n- [Versioning](#versioning)\n- [Examples](#examples)\n- [Other CI Platforms](#other-ci-platforms)\n- [Resources](#resources)\n\n## Usage\n\nThe following shows the minimum setup to configure the GitHub Action with a command and return counts as outputs. Learn about the [supported inputs](#inputs) you can use to customize the GitHub Action.\n\n```yaml\nname: API Tests\n\non: [push]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Run Bruno Collection\n        uses: usebruno/bruno-cli-action@v1\n        with:\n          working-directory: tests/payments\n          command: 'run --env prod'\n```\n\n**What you'll see:** the workflow step turns red on assertion failure (green on success). Outputs are populated for downstream conditional steps.\n\nUI rendering, artifact upload, PR comments, and soft-fail semantics are delegated to the GitHub Actions ecosystem (`EnricoMi/publish-unit-test-result-action`, `dorny/test-reporter`, `actions/upload-artifact`, `continue-on-error`). See [Examples](#examples) for canonical recipes.\n\n## Customize\n\nCustomize the Bruno CLI GitHub Action to suit your API project's CI/CD workflow.\n\n### Inputs\n\n| Name | Type | Description |\n|---|---|---|\n| `command` | String | **Required.** The Bruno CLI command to run and its options (e.g. `run --env prod`). The action prepends `bru`. |\n| `bru-version` | String | Version of `@usebruno/cli` to install. (Default: `latest`) |\n| `working-directory` | String | Path of the Bruno collection directory. (Default: `.`) |\n\n**Example using all inputs:**\n\n```yaml\n- name: Run Bruno collection\n  uses: usebruno/bruno-cli-action@v1\n  with:\n    command: 'run --env prod --reporter-junit results.xml'\n    bru-version: '3.5.0'\n    working-directory: tests/payments\n```\n\n### Outputs\n\nAvailable as `${{ steps.\u003cid\u003e.outputs.\u003cname\u003e }}` in subsequent steps:\n\n| Name | Description |\n|---|---|\n| `exit-code` | Exit code from the Bruno CLI command. 0 indicates success, non-zero indicates failure. |\n| `passed` | Number of passed requests. |\n| `failed` | Number of failed requests (assertion failures or runtime errors). |\n| `total` | Total number of requests run. |\n| `duration-ms` | Total run duration in milliseconds. |\n\n## Versioning\n\n| Tag | Behaviour |\n|---|---|\n| `@v1` | Floating major. Receives every backwards-compatible release. |\n| `@v1.0.0` | Immutable. Pinned to a specific release. |\n\nThe `v\u003cmajor\u003e` tag is retagged automatically on every published release.\n\n## Examples\n\nThe following examples cover some of the reporting and artifact use case. Use `--reporter-junit` flag to emit clean JUnit XML; downstream actions render it for the user-visible surface needed or upload it as a workflow artifact.\n\n- [PR comment on every run (sticky)](#pr-comment-on-every-run-sticky)\n- [Checks tab UI via dorny/test-reporter](#checks-tab-ui-via-dornytest-reporter)\n- [Artifact upload with header sanitization](#artifact-upload-with-header-sanitization)\n- [Multiple report formats (JUnit + HTML + JSON)](#multiple-report-formats-junit--html--json)\n- [Slack notification on failure](#slack-notification-on-failure)\n- [Simple non-sticky PR comment via gh CLI](#simple-non-sticky-pr-comment-via-gh-cli)\n\n### PR comment on every run (sticky)\n\nThe most common ask. `EnricoMi/publish-unit-test-result-action` posts a single comment per PR with structured results, updated on re-runs. Adds a check run with rich annotations as a side benefit.\n\n```yaml\nname: API Tests\non: [pull_request]\n\npermissions:\n  pull-requests: write\n  checks: write\n  contents: read\n\njobs:\n  bruno:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n      - uses: usebruno/bruno-cli-action@v1\n        with:\n          working-directory: tests/payments\n          command: 'run --env prod --reporter-junit results.xml'\n\n      - uses: EnricoMi/publish-unit-test-result-action@v2\n        if: always()\n        with:\n          files: tests/payments/results.xml\n```\n\n**What you'll see:** a single Bruno-themed comment in the PR Conversation tab that updates in place on every re-run, plus a check run with structured per-test results in the PR Checks tab.\n\n### Checks tab UI via dorny/test-reporter\n\nIf you have a polyglot test stack (Jest, Pytest, Bruno) and want all results in the same Checks tab UI, dorny is the better tool than EnricoMi:\n\n```yaml\n- uses: usebruno/bruno-cli-action@v1\n  with:\n    working-directory: tests/payments\n    command: 'run --env prod --reporter-junit results.xml'\n\n- uses: dorny/test-reporter@v1\n  if: always()\n  with:\n    name: Bruno API tests\n    path: tests/payments/results.xml\n    reporter: java-junit\n```\n\n**What you'll see:** a separate check run in the PR Checks tab labeled \"Bruno API tests\" with structured per-test results and expandable failure details. Visually consistent with check runs from your other JUnit-emitting test suites.\n\n### Artifact upload with header sanitization\n\nBruno's CLI handles sensitive-header redaction; pass the flag in `command`. Chain `actions/upload-artifact@v7` to persist the report:\n\n```yaml\n- uses: usebruno/bruno-cli-action@v1\n  with:\n    working-directory: tests/payments\n    command: 'run --env prod --reporter-junit results.xml --reporter-skip-headers \"Authorization Cookie X-Tenant-Token\"'\n\n- uses: actions/upload-artifact@v7\n  if: always()\n  with:\n    name: bruno-report-${{ github.run_id }}-${{ github.job }}\n    path: tests/payments/results.xml\n```\n\n**What you'll see:** an artifact named `bruno-report-\u003crun_id\u003e-\u003cjob\u003e` on the workflow run page, downloadable for 90 days (GitHub default retention).\n\n### Multiple report formats (JUnit + HTML + JSON)\n\nPass multiple reporter flags in `command`. Chain `actions/upload-artifact@v7` with a path list:\n\n```yaml\n- uses: usebruno/bruno-cli-action@v1\n  with:\n    working-directory: tests/payments\n    command: 'run --env prod --reporter-junit results.xml --reporter-html report.html --reporter-json report.json'\n\n- uses: actions/upload-artifact@v7\n  if: always()\n  with:\n    name: bruno-reports-${{ github.run_id }}\n    path: |\n      tests/payments/results.xml\n      tests/payments/report.html\n      tests/payments/report.json\n```\n\n**What you'll see:** an artifact containing all three report files. Download to a browser to view the rich HTML report; JSON is consumable by custom dashboards or aggregators.\n\n### Slack notification on failure\n\nUse the action's `failed` output as a conditional. Use `continue-on-error: true` so the notification step still runs:\n\n```yaml\n- id: bruno\n  uses: usebruno/bruno-cli-action@v1\n  continue-on-error: true\n  with:\n    working-directory: tests/payments\n    command: 'run --env prod'\n\n- if: steps.bruno.outputs.failed != '0'\n  uses: slackapi/slack-github-action@v1\n  with:\n    payload: |\n      {\n        \"text\": \"Bruno tests failed: ${{ steps.bruno.outputs.failed }}/${{ steps.bruno.outputs.total }} requests failed on ${{ github.ref_name }}\",\n        \"blocks\": [{\n          \"type\": \"section\",\n          \"text\": {\n            \"type\": \"mrkdwn\",\n            \"text\": \"*Bruno test failures on ${{ github.ref_name }}*\\n${{ steps.bruno.outputs.failed }}/${{ steps.bruno.outputs.total }} requests failed in ${{ steps.bruno.outputs.duration-ms }}ms. \u003c${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run\u003e\"\n          }\n        }]\n      }\n  env:\n    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n```\n\n**Prerequisites:** `SLACK_WEBHOOK_URL` secret configured in the repository.\n**What you'll see:** the Bruno step shows red on failure (honest signal) but the workflow continues; a Slack message lands in the channel mapped to the webhook with counts, branch, duration, and a link to the workflow run.\n\n### Simple non-sticky PR comment via gh CLI\n\nFor users who do not want EnricoMi's full setup and only need a quick \"post a comment with the counts\" pattern (no stickiness, each run adds a new comment):\n\n```yaml\n- id: bruno\n  uses: usebruno/bruno-cli-action@v1\n  with:\n    working-directory: tests/payments\n    command: 'run --env prod'\n\n- if: always() \u0026\u0026 github.event_name == 'pull_request'\n  run: |\n    if [ \"${{ steps.bruno.outputs.failed }}\" -gt 0 ]; then\n      ICON=\"❌\"\n      STATUS=\"${{ steps.bruno.outputs.passed }}/${{ steps.bruno.outputs.total }} passed, ${{ steps.bruno.outputs.failed }} failed\"\n    else\n      ICON=\"✅\"\n      STATUS=\"${{ steps.bruno.outputs.total }}/${{ steps.bruno.outputs.total }} passed\"\n    fi\n    gh pr comment ${{ github.event.pull_request.number }} \\\n      --body \"${ICON} **Bruno:** ${STATUS} in ${{ steps.bruno.outputs.duration-ms }}ms · [view run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})\"\n  env:\n    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n**Prerequisites:** `pull-requests: write` permission and the workflow triggered on `pull_request`.\n**What you'll see:** a new comment posted to the PR on every workflow run. Each re-run adds another comment (no in-place update). Use EnricoMi (above) if you want stickiness.\n\n## Other CI platforms\n\nBruno's CLI works on Jenkins, Azure DevOps, GitLab CI, and Bitbucket Pipelines via direct CLI invocation. The [Bruno CLI Docker image](https://hub.docker.com/r/usebruno/cli) is the recommended primitive there. See the [Bruno CLI Docker docs](https://docs.usebruno.com/bru-cli/docker) for platform-specific examples.\n\n## Resources\n\n- [Bruno CLI documentation](https://docs.usebruno.com/bru-cli/overview)\n- [Bruno CLI command options](https://docs.usebruno.com/bru-cli/commandOptions)\n- [Bruno NPM package](https://www.npmjs.com/package/@usebruno/cli)\n- [Main Bruno repo](https://github.com/usebruno/bruno)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusebruno%2Fbruno-cli-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusebruno%2Fbruno-cli-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusebruno%2Fbruno-cli-action/lists"}