Skip to content

Workflow and action inputs

Reusable workflows use underscore names. Composite actions use hyphenated input names. An empty override leaves configuration or the runtime default in effect. Variables and secrets shows how to supply credentials by job.

Reusable .github/workflows/pr-scan.yml.

Input Type Default Purpose
token_worker_audience String Empty Required OIDC audience for a custom Worker.
token_worker_url String Empty Token Worker base URL, empty for the hosted Code Hawk Worker.
app_id String Empty Your own App ID, used only with CODEHAWK_PRIVATE_KEY. The hosted App needs neither.
review_drafts Boolean false Also scan draft PRs.
runs_on JSON string "ubuntu-24.04" One runner label or an array of labels. Pass '["self-hosted","linux"]' for both labels.

Optional self-hosted secret: CODEHAWK_PRIVATE_KEY, paired with app_id. The scan takes no inference document or credential slots.

Reusable .github/workflows/pr-review.yml. One workflow dispatches either the review or the reply job based on the caller event.

Input Type Default Purpose
token_worker_audience String Empty Required OIDC audience for a custom Worker.
token_worker_url String Empty Token Worker base URL, empty for the hosted Code Hawk Worker.
app_id String Empty Your own App ID, used only with CODEHAWK_PRIVATE_KEY. The hosted App needs neither.
inference String Empty Deprecated for one release. A nonempty inference document overrides file routes.
review_drafts Boolean false Allow draft PR review.
config_path String .github/codehawk.json Settings read from the default branch, other review rules from the trusted base.
max_usd String Empty Positive PR review cap or uncapped. Does not change reply spend.

Optional named secrets: CODEHAWK_PRIVATE_KEY (self-hosted opt-in with app_id), CODEHAWK_CREDENTIAL_1 through _8, CODEHAWK_OPENAI_API_KEY, CODEHAWK_ANTHROPIC_API_KEY, CODEHAWK_GOOGLE_API_KEY and CODEHAWK_GATEWAY_TOKEN. Readiness accepts OIDC or an App key. The run reads settings from the default branch, then validates the provider keys and models for its roles.

Reusable .github/workflows/weekly-review.yml.

Input Type Default Purpose
token_worker_audience String Empty Required OIDC audience for a custom Worker.
token_worker_url String Empty Token Worker base URL, empty for the hosted Code Hawk Worker.
app_id String Empty Your own App ID, used only with CODEHAWK_PRIVATE_KEY. The hosted App needs neither.
inference String Empty Deprecated for one release. Overrides file routes while nonempty.
base_branch String Empty Reviewed branch, empty uses the repository's default branch.
area String Empty Choose an area file by name without .md.
dry_run Boolean false Print results and write no GitHub issues.
config_path String .github/codehawk.json Relative path, model routes and caps read from the default branch.
runs_on JSON string "ubuntu-24.04" One runner label or an array of labels.
max_usd String Empty Override weekly.max_usd.
context_tokens String Empty Override weekly.context_tokens.

Optional named secrets: CODEHAWK_PRIVATE_KEY (self-hosted opt-in with app_id) and CODEHAWK_CREDENTIAL_1 … _8. An independent checker on another slot needs that slot forwarded too.

Reusable .github/workflows/fix-request.yml takes token_worker_url (empty for the hosted Worker), optional app_id with CODEHAWK_PRIVATE_KEY for your own App, required bot_login and test_image, and optional inference and config_path. Forward only the credential slots used by fix generation. See the caller.

Reusable .github/workflows/settings-command.yml accepts token_worker_url, token_worker_audience and optional app_id with CODEHAWK_PRIVATE_KEY for your own App. See the caller.

Reusable .github/workflows/fix-issues.yml takes required string test_image. Optional strings are inference (empty, deprecated), issues (empty), label (codehawk-fix), config_path (.github/codehawk.json), token_worker_url, token_worker_audience and app_id (empty). Forward the named provider secrets (CODEHAWK_OPENAI_API_KEY, CODEHAWK_ANTHROPIC_API_KEY, CODEHAWK_GOOGLE_API_KEY, CODEHAWK_GATEWAY_TOKEN) and any used CODEHAWK_CREDENTIAL_1 through _8 slots explicitly. CODEHAWK_PRIVATE_KEY is the optional self-hosted App key. Tests run without OIDC. Publication runs without a checkout.

Reusable .github/workflows/browser-flows.yml takes required strings application_image, application_command and base_url. The deprecated inference input is optional and defaults to empty.

Input Default
install_command ["npm","ci"] JSON argv
install_image node:24-bookworm
application_env Empty, comma-separated variable names
config_path .github/codehawk.json on the default branch
flows_path .github/codehawk-flows.json
max_usd Empty, uncapped unless settings specify a cap
allow_setup false
setup_env Empty
playwright_image mcr.microsoft.com/playwright:v1.63.0-noble
s3_endpoint, s3_bucket Empty, required at run time
s3_region auto
token_worker_url, token_worker_audience, app_id Empty
label hawk-browser-flows

All inputs are strings. Forward the named provider secrets (CODEHAWK_OPENAI_API_KEY, CODEHAWK_ANTHROPIC_API_KEY, CODEHAWK_GOOGLE_API_KEY, CODEHAWK_GATEWAY_TOKEN) and any used CODEHAWK_CREDENTIAL_1 through _8 slots, CODEHAWK_S3_ACCESS_KEY_ID, CODEHAWK_S3_SECRET_ACCESS_KEY and CODEHAWK_APPLICATION_ENV explicitly. Application settings are a JSON object of names to string values and names must appear in application_env. The optional CODEHAWK_PRIVATE_KEY selects your own App. Only the run job gets inference and S3 secrets. Only the report job gets OIDC and an App token.

Reusable .github/workflows/preview-flows.yml accepts only pull_request runs from the same repository. It requires preview_environments, preview_hosts, preview_creators, s3_endpoint and s3_bucket. Optional inputs are preview_label (hawk-browser-flows), preview_bypass (none), preview_wait_seconds (600), s3_region (auto), flows_path (.github/codehawk-flows.json), max_usd (empty), playwright_image (mcr.microsoft.com/playwright:v1.63.0-noble), inference, token_worker_url, token_worker_audience and app_id (empty). All are strings.

Forward provider and storage secrets explicitly, plus CODEHAWK_PREVIEW_BYPASS_SECRET and CODEHAWK_PREVIEW_BYPASS_CLIENT_ID when needed. Preparation reads default-branch settings and deployment metadata without provider keys or a checkout. The browser job receives provider, storage and bypass secrets, with no App token or OIDC access. Reporting has no checkout and uses the preview permission slice. See browser flows.

actions/token takes a required permissions JSON object and optional audience, worker-url, app-id, private-key and app-slug. It returns token, expires-at, app-slug and source. See workflow usage for defaults and error handling. Hosted tokens need id-token: write on the job and its caller.

All composite inputs are strings. These are the shared inputs, followed by the action-specific ones.

Input PR review Weekly review Verified fixes Browser flows
github-token Required App token Required App token or dry-run workflow token Required, read-only workflow token for fix, App write token for publish Workflow read token for container run, App token for report and preview preparation, no token for the preview browser stage
inference Optional, deprecated Optional, deprecated Optional for fix, deprecated Optional, deprecated
credential-1 … credential-8 Used slots Used slots Used slots, fix only Used slots
config-path .github/codehawk.json .github/codehawk.json .github/codehawk.json .github/codehawk.json

actions/pr-review additionally takes bot-login (required) and max-usd (empty, inherits config, positive amount or uncapped). The workflow gives it the App bot's login including [bot].

actions/weekly-review additionally takes area (empty, uses rotation), dry-run ("false"), and max-usd and context-tokens (both empty, to inherit config).

actions/fix-issues additionally takes stage (required, fix or publish), test-image (a trusted image pinned by @sha256 digest, needed for fix), issues (empty, picks labelled issues, otherwise accepts space-, comma-, or newline-separated numbers), and base-sha (empty, supply the fix stage's output to publish). The fix stage emits base-sha and attempted and uploads the one-day fix record. publish consumes that record and receives no inference document, credential slots, or test image.

actions/flows takes stage (prepare, browser, run, report or default all). run uploads media and writes $RUNNER_TEMP/codehawk-flows/report.json without posting. report posts only that artifact and needs neither application nor inference settings. The default keeps the single-job local and self-hosted behavior. It additionally takes:

Input Default Purpose
bot-login Required App's bot login including [bot].
application-image Required Trusted application image pinned by @sha256 digest.
application-command Required Trusted JSON argv array that starts the app, passed without a shell.
application-env Empty Safe application variable names, separate from setup-env.
s3-endpoint, s3-bucket Required S3 API base URL and bucket name.
s3-access-key-id, s3-secret-access-key Required Bucket-scoped credentials for upload and signed reads.
s3-region auto R2 uses auto, other providers may require a region.
flows-path .github/codehawk-flows.json Test users, library, and optional setup list.
base-url http://localhost:3000 Address of the managed application container on host networking.
max-usd Empty, uncapped unless set in caps.flows Combined planner, driver, and diagnosis cap, fallbacks included.
allow-setup "false" Set to "true" only for a throwaway database.
setup-env Empty Allowlisted names, separated by spaces or commas.
playwright-image mcr.microsoft.com/playwright:v1.63.0-noble Match the caller's pinned @playwright/test release.

The planner, driver and diagnosis models come from jobs.flows_plan, jobs.flows_driver and jobs.flows_diagnosis in the default-branch settings, or from the deprecated inference override.

Standard provider secrets and settings transport

Section titled “Standard provider secrets and settings transport”

Reusable model workflows accept optional CODEHAWK_OPENAI_API_KEY, CODEHAWK_ANTHROPIC_API_KEY, CODEHAWK_GOOGLE_API_KEY and CODEHAWK_GATEWAY_TOKEN. Forward the names used by the job's routes under secrets:. Actions map openai-api-key, anthropic-api-key, google-api-key and gateway-token to those environment names. New secret names have no legacy aliases. The eight explicit credential inputs still work.

config_path and config-path select a relative path without ... Models and caps always come from the default branch. Other sections keep their existing checkout or base-commit source. All max_usd and max-usd inputs are deprecated in favour of the caps block. Empty inputs leave the file in effect. A positive amount sets a cap and uncapped removes it.

The fix-request action exposes validated JSON as the resolve stage's settings output. The workflow passes it to the fix stage's settings input, mapped to CODEHAWK_SETTINGS. The fix stage parses it again and makes no GitHub settings read. Resolve holds only a read token. Only fix gets provider keys and the test image. Publish alone holds the posting token and posts any setup problem recorded by resolve or fix.