> For the complete documentation index, see [llms.txt](https://docs.getantidote.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getantidote.com/welcome-to-antidote/integrations/github-actions/configuration-reference.md). Agents can also search and read this documentation through its [MCP server](https://docs.getantidote.com/~gitbook/mcp).

# Configuration reference

Review inputs, outputs, secrets, and versioning.

Use this reference when you need to tune URL resolution, read action outputs, or pin a specific release.

### `preview` inputs

| Name                                   | Required | Default                            | Description                                                                                                                                                                                                                                                          |
| -------------------------------------- | -------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `product-id`                           | Yes      | *(none)*                           | Antidote product ID from the dashboard address (the part after /p/ while the product is open).                                                                                                                                                                       |
| `api-key`                              | No       | *(empty)*                          | Platform API key from **Settings → API keys**. Leave it out when the job signs in through the Antidote GitHub App; see [Signing in](#signing-in).                                                                                                                    |
| `api-url`                              | No       | `https://platform.getantidote.com` | The Antidote Platform URL.                                                                                                                                                                                                                                           |
| `run-exploration`                      | No       | `true`                             | On a `push`, test the build after recording it. `false` records the build only. On a pull request, Antidote tests the build when someone comments `@antidoteapp`.                                                                                                    |
| `exploration-url`                      | No       | *product base URL*                 | Explore this URL instead of resolving one.                                                                                                                                                                                                                           |
| `vercel-automation-bypass-secret`      | No       | *(empty)*                          | Bypass Vercel Deployment Protection on protected previews.                                                                                                                                                                                                           |
| `release-label`                        | No       | *(empty)*                          | Human-readable release name for this build, e.g. `1.4.2`. Recorded alongside the commit SHA.                                                                                                                                                                         |
| `apk-path`                             | No       | *(empty)*                          | Android only. The pull request's APK, or a folder that holds exactly one `.apk`. Antidote tests it on the product's primary device. See [Upload builds from CI](https://docs.getantidote.com/welcome-to-antidote/android-apps/upload-builds-from-ci.md).             |
| `credential-set`                       | No       | *(empty)*                          | The persona to log in as, by name or ID, from this product's personas, on runs outside a pull request. An unknown name fails the step. Empty uses the product's default login.                                                                                       |
| `preview-url-source`                   | No       | `auto`                             | How to resolve the preview URL on a PR: `auto`, `deployments`, `checks`, `statuses`, `comments`, or `none`. `auto` tries GitHub Deployments, then Checks, then Statuses for the PR's head commit. Set `comments` to read the URL from a deployment bot's PR comment. |
| `preview-timeout-seconds`              | No       | `60`                               | How long to wait for a preview URL to appear in a PR comment. Used only with `preview-url-source: comments`.                                                                                                                                                         |
| `preview-poll-interval-seconds`        | No       | `5`                                | How often to poll for the preview URL. Used only with `preview-url-source: comments`.                                                                                                                                                                                |
| `wait-for-target-seconds`              | No       | *(empty)*                          | Give the preview URL this long to start serving before the run begins, on runs outside a pull request. Empty starts immediately. Antidote caps the wait and logs a warning if it shortens your request.                                                              |
| `preview-deployment-environment-regex` | No       | *(empty)*                          | Regex matching the GitHub Deployment environment name. Defaults to a conservative `preview\|review\|staging\|pr`.                                                                                                                                                    |
| `preview-check-name-regex`             | No       | *(empty)*                          | Regex matching a Check Run name. Skipped in `auto` if empty.                                                                                                                                                                                                         |
| `preview-status-context-regex`         | No       | *(empty)*                          | Regex matching a commit status context. Skipped in `auto` if empty.                                                                                                                                                                                                  |
| `preview-comment-author-logins`        | No       | *(empty)*                          | Comma separated bot or user logins whose PR comments may carry the preview URL, for example `vercel[bot],netlify[bot]`.                                                                                                                                              |
| `preview-url-regex`                    | No       | *(empty)*                          | Regex to extract the preview URL from a provider comment.                                                                                                                                                                                                            |
| `repository`                           | No       | *(empty)*                          | Repository in `owner/repo` format. Set this together with `pr-number` to record that pull request's build from a trigger other than `pull_request`.                                                                                                                  |
| `pr-number`                            | No       | *(empty)*                          | Pull request number. Set this together with `repository` to record that pull request's build from a trigger other than `pull_request`.                                                                                                                               |
| `github-token`                         | No       | `${{ github.token }}`              | Finds the preview URL through GitHub, and reads the pull request's head when you set `repository` and `pr-number`. Defaults to the job's token.                                                                                                                      |

### `preview` outputs

| Name                 | Description                                                                                                                                                                        |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target-id`          | ID of the preview build Antidote recorded.                                                                                                                                         |
| `target-name`        | Name of the preview build.                                                                                                                                                         |
| `target-version`     | Version of the preview build.                                                                                                                                                      |
| `run-id`             | The execution Antidote started, if any. On a pull request it is empty, because the test starts when someone comments `@antidoteapp`. With `apk-path`, it is the pull request test. |
| `run-status`         | `triggered` when Antidote started a run, otherwise `skipped`.                                                                                                                      |
| `preview-url-source` | Which resolver found the URL: `deployments`, `checks`, `statuses`, `comments`, or `override` when `exploration-url` was set. Empty when no URL was sent.                           |
| `build-warnings`     | With `apk-path`, notes Antidote has about the APK, one per line.                                                                                                                   |

### `environment` inputs

| Name                                   | Required | Default                             | Description                                                                                                                                                                                                                                                                                                                                               |
| -------------------------------------- | -------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `product-id`                           | Yes      | *(none)*                            | Antidote product ID. Each commit is recorded as a release on one of its environments.                                                                                                                                                                                                                                                                     |
| `api-key`                              | No       | *(empty)*                           | Platform API key from **Settings → API keys**. Leave it out when the job signs in through the Antidote GitHub App; see [Signing in](#signing-in).                                                                                                                                                                                                         |
| `environment`                          | No       | *the product's default environment* | Name of an environment declared in **Product settings → Environments**, e.g. `staging`.                                                                                                                                                                                                                                                                   |
| `release-label`                        | No       | *(empty)*                           | Release name for this build, e.g. `1.4.2`. Overrides `release-label-from`.                                                                                                                                                                                                                                                                                |
| `release-label-from`                   | No       | `git-describe`                      | Where the release name comes from when `release-label` is empty: `git-describe` (`git describe --tags --always --dirty`, e.g. `v0.1.1-2-g321798b`), `git-tag` (the exact tag on the commit), `package-json` (the `version` field), or `input` (only `release-label`). If the source yields nothing, the short commit SHA is used and a warning is logged. |
| `package-json-path`                    | No       | `package.json`                      | Read only when `release-label-from` is `package-json`.                                                                                                                                                                                                                                                                                                    |
| `commit`                               | No       | *(empty)*                           | On `workflow_dispatch` and `schedule` runs, the deployed commit as a tag, branch or SHA. Antidote records it on the release. Pass `release-label` with it. Not used on `push`, where GitHub names the commit.                                                                                                                                             |
| `apk-path`                             | No       | *(empty)*                           | Android only. The APK, or a folder that holds exactly one `.apk`. See [Upload builds from CI](https://docs.getantidote.com/welcome-to-antidote/android-apps/upload-builds-from-ci.md).                                                                                                                                                                    |
| `run-exploration`                      | No       | `true`                              | Start Antidote's run: it runs your flows on the release and queues an exploration. `false` records the release only.                                                                                                                                                                                                                                      |
| `wait-for-deployment`                  | No       | `false`                             | Wait until the environment serves the pushed commit before anything is recorded. Your app must return its deployed commit in a response header.                                                                                                                                                                                                           |
| `wait-for-deployment-timeout-seconds`  | No       | `300`                               | How long to wait before failing the step.                                                                                                                                                                                                                                                                                                                 |
| `wait-for-deployment-interval-seconds` | No       | `10`                                | Delay between checks.                                                                                                                                                                                                                                                                                                                                     |
| `wait-commit-header`                   | No       | `x-commit-sha`                      | Response header carrying the deployed commit (full or 7-character SHA).                                                                                                                                                                                                                                                                                   |
| `wait-commit-path`                     | No       | `/`                                 | Path checked on each poll, e.g. `/api/health`.                                                                                                                                                                                                                                                                                                            |
| `api-url`                              | No       | `https://platform.getantidote.com`  | The Antidote Platform URL.                                                                                                                                                                                                                                                                                                                                |
| `github-token`                         | No       | `${{ github.token }}`               | Used only to look up the `commit` input (needs `contents: read`). Defaults to the job's token.                                                                                                                                                                                                                                                            |

The `environment` action records releases on your environments. For a pull request's preview, use the `preview` action.

### Pull requests from other triggers

Set `repository` and `pr-number` on the `preview` action when it runs on `deployment_status`, `workflow_run` or `repository_dispatch` and should still record a pull request's build. The action reads the pull request's head through `github-token`.

This is useful when the PR or URL is only known later in the pipeline.

### `environment` outputs

| Name             | Description                                                                                                            |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `target-id`      | The build the run was attributed to.                                                                                   |
| `release-id`     | The release the build was recorded as.                                                                                 |
| `run-id`         | The execution Antidote started. Empty when `run-exploration` is `false`.                                               |
| `run-status`     | `triggered` when Antidote started its run (see the Antidote dashboard for results), or `skipped` when nothing started. |
| `build-warnings` | With `apk-path`, notes Antidote has about the APK, one per line.                                                       |

### Signing in

Each action signs in to Antidote in one of two ways:

* **An API key.** Pass `api-key: ${{ secrets.PLATFORM_API_KEY }}`.
* **The Antidote GitHub App.** Leave `api-key` out and give the job `permissions: id-token: write`. The job signs in through your organisation's linked Antidote GitHub App, with no secret to store. An org admin sees whether this is set up on the installation's **CI sign-in** line in **Settings → Integrations**.

### Runner

Both actions need a Linux or macOS runner with Node 22.4 or newer. Add `actions/setup-node@v4` with `node-version: 22` before the action if your runner's Node is older.

### Release names

With `product-id`, each commit is recorded as one release. By default its name comes from `git describe`, so check out the repository with tags first:

```yaml
- uses: actions/checkout@v4
  with:
    fetch-depth: 0
```

Pass `release-label` to use your own name, for example a version your build step outputs. If a commit already has a release under a different name, the existing name is kept and the step logs a warning. Rename the release in the Antidote dashboard instead.

### Secrets and variables to configure

| Name                              | Kind     | Used by | Description                                                                                                      |
| --------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
| `PLATFORM_API_KEY`                | secret   | both    | Platform API key from **Settings → API keys**. Not needed when the job signs in through the Antidote GitHub App. |
| `PLATFORM_PRODUCT_ID`             | variable | both    | Antidote product ID from the dashboard address (the part after /p/ while the product is open).                   |
| `VERCEL_AUTOMATION_BYPASS_SECRET` | secret   | preview | Optional bypass secret for Vercel Deployment Protection on protected previews.                                   |

### Versioning and pinning

Each action is versioned with an `<action>/v<semver>` tag. The major tags `preview/v1` and `environment/v1` always point at the latest 1.x release:

```yaml
# Follow the latest 1.x release.
- uses: duku-ai/actions/preview@preview/v1
- uses: duku-ai/actions/environment@environment/v1

# Or pin to a specific release.
- uses: duku-ai/actions/preview@preview/v1.1.0
- uses: duku-ai/actions/environment@environment/v1.1.0
```

Both actions release together at the same version.

On a pull request, Antidote's test posts a GitHub check run; see [GitHub check runs](https://docs.getantidote.com/welcome-to-antidote/integrations/github-check-runs.md). Each action exits once Antidote has recorded the build, so its exit code does not reflect the result.

### Read next

* [Quickstart: preview action](https://docs.getantidote.com/welcome-to-antidote/integrations/github-actions/quickstart-preview-action.md)
* [Quickstart: environment action](https://docs.getantidote.com/welcome-to-antidote/integrations/github-actions/quickstart-environment-action.md)
* [Troubleshooting](https://docs.getantidote.com/welcome-to-antidote/integrations/github-actions/troubleshooting.md)
