Workflow YAML reference
Define when Shipfox runs and what each workflow does.
Each section lists the fields for one part of a workflow YAML file and highlights that part in an example.
Enable editor autocomplete
Add # yaml-language-server: $schema=https://www.shipfox.io/docs/workflow.schema.json
as the first line of a workflow file.
Workflow
namestringRequiredNames the workflow.
Use a literal value. Workflow expressions are not allowed.
run_namestringNames each workflow run. Supports workflow expressions.
triggersRecord<string, Trigger>Defines the events that start the workflow. Add no more than one
manualtrigger.concurrencyConcurrencyLimits each group to one active run and the newest waiting run. See Workflow concurrency groups.
runnerstring | string[]Selects the default runner for jobs in this workflow. List labels in fallback order. See Runners and execution environments.
envEnvironmentSets environment variables for run steps in every job.
jobsRecord<string, Job>RequiredDefines the jobs that the workflow runs. Add at least one job.
outputsRecord<string, string>Creates named outputs from job outputs when a run succeeds. An output that cannot be evaluated fails the run.
name: Deploy
run_name: Deploy ${{ event.ref }}
triggers:
push:
source: github_acme
event: push
concurrency:
group: deploy-${{ event.ref }}
runner: shipfox
env:
NODE_ENV: production
jobs:
deploy:
steps:
- key: deploy
run: echo "url=https://example.com" >> "$SHIPFOX_OUTPUT"
outputs:
url: string
outputs:
url: ${{ steps.deploy.outputs.url }}
outputs:
url: ${{ jobs.deploy.outputs.url }}
triggers.<trigger_id>
sourcestringRequiredSelects the slug of an integration connection or a built-in source that starts the workflow. See Integrations for provider sources.
eventstringSelects the event that starts the workflow. Omit it to accept every event from the source.
filterstringStarts the workflow only when an event matches this condition. The condition can use
eventandtrigger.manualandcrontriggers do not use this field. See Expressions and Contexts.withRecord<string, value>Provides values that match or configure the trigger. See each provider's event catalog in Integrations.
secretsRecord<string, value>Maps trigger input names to secret names in the Shipfox project.
configRecord<string, value>Configures a built-in trigger source, such as
cron. See Schedule workflows.
name: Review pull requests
triggers:
ready:
source: github_acme
event: pull_request.ready_for_review
filter: event.pull_request.base.ref == "main"
secrets:
REVIEW_TOKEN: REVIEW_TOKEN
nightly:
source: cron
with:
suite: full
config:
schedule: "0 2 * * *"
jobs:
review:
steps:
- prompt: Review the change and report the main risks.
concurrency
groupstringRequiredNames the group. Runs with the same group name wait for each other. Supports workflow expressions. See Contexts.
scopeenumDefaultworkflowChooses whether the group applies to this workflow or every workflow in the project.
workflowproject
cancel_in_progressbooleanDefaultfalseSet to
trueto stop the active run when a newer run joins the group.
name: Deploy
concurrency:
group: deploy-${{ event.ref }}
scope: project
cancel_in_progress: true
triggers:
push:
source: github_acme
event: push
jobs:
deploy:
steps:
- run: ./deploy.sh
env
<NAME>string | number | booleanDefines one environment variable. Values support workflow expressions.
Use letters, numbers, and underscores. Start with a letter or underscore.
name: Build
env:
NODE_ENV: production
CI: true
jobs:
build:
env:
PORT: 3000
steps:
- run: pnpm build
env:
LOG_LEVEL: debug
jobs.<job_id>
namestringNames the job.
Use a literal value. Workflow expressions are not allowed.
execution_namestringSets the name of each job execution. Supports workflow expressions.
needsstring | string[]Lists the jobs that must finish before this job starts.
ifstringRuns this job only when the condition is true. See Conditionals.
runnerstring | string[]Selects the runner for this job. List labels in fallback order. See Runners and execution environments.
execution_timeoutstringStops one job execution after this duration.
envEnvironmentSets environment variables for every run step in this job.
checkoutJobCheckoutConfigures repository permissions and saved credentials for this job. Set to
falseto skip checkout.listeningListeningKeeps the job open for matching events. Set
until,timeout, ormax_executionsto end it. See Listening jobs.stepsStep[]RequiredLists the steps that this job runs in order.
Add at least one item.
successstringMarks the job as successful when the condition returns
true. See Expressions and Contexts.outputsRecord<string, string>Creates named outputs from values produced by this job's steps. A later job must list this job in
needsbefore it can use them.
name: Build and release
jobs:
build:
name: Build
runner: shipfox
execution_timeout: 30m
env:
NODE_ENV: production
steps:
- key: pkg
run: printf 'version=%s\n' "$(cat VERSION)" >> "$SHIPFOX_OUTPUT"
outputs:
version: string
outputs:
version: ${{ steps.pkg.outputs.version }}
release:
execution_name: Release ${{ jobs.build.outputs.version }}
needs: build
if: ${{ event.ref == "refs/heads/main" }}
steps:
- key: publish
run: ./publish.sh "${{ jobs.build.outputs.version }}"
success: ${{ steps.publish.status == "succeeded" }}
jobs.<job_id>.checkout
permissionsCheckoutPermissionsSets the repository permissions for this checkout.
persist-credentialsbooleanKeeps checkout credentials available to later run steps.
name: Push a fix
jobs:
fix:
checkout:
permissions:
contents: write
persist-credentials: true
steps:
- prompt: Fix the failing test and commit the change.
- run: git push origin HEAD
jobs.<job_id>.listening
onTrigger[]RequiredSelects the events to listen for.
Add at least one item.
untilTrigger[]Stops listening when one of these events arrives.
Add at least one item.
timeoutstringStops listening after this duration.
max_executionsintegerStops listening after this many job executions.
Use a number greater than 0.
batchListeningBatchGroups matching events before the job processes them. Set
debounce,max_size, ormax_wait.on_resolveenumChooses what Shipfox does when listening ends.
finishlets the current execution finish.cancelstops it.finishcancel
name: Answer review comments
jobs:
answer:
listening:
on:
- source: github_acme
event: pull_request_review_comment.created
until:
- source: github_acme
event: pull_request.closed
timeout: 8h
max_executions: 10
on_resolve: finish
steps:
- prompt: Answer the review comment in the step log.
jobs.<job_id>.listening.batch
debouncestringWaits for this quiet period before processing a batch.
max_sizeintegerLimits each batch to this number of events.
Use a number greater than 0.
max_waitstringProcesses a partial batch after this duration.
name: Summarize review comments
jobs:
summarize:
listening:
on:
- source: github_acme
event: pull_request_review_comment.created
timeout: 8h
batch:
debounce: 30s
max_size: 5
max_wait: 2m
steps:
- prompt: Summarize the comments in this batch.
jobs.<job_id>.steps[*]
keystringGives the step an identifier that other fields can use.
namestringSets the name shown for the step.
ifstringRuns this step only when the condition is true. See Conditionals.
gateGateChecks the step result and can restart earlier steps. Set
success,on_failure, or both. See Feedback loops.outputsRecord<string, Output>Defines values that later steps can use.
name: Test
jobs:
test:
steps:
- key: unit
name: Unit tests
if: ${{ event.pull_request.draft == false }}
run: pnpm test
gate:
success: step.exit_code == 0
steps[*].gate
successstringMarks the step as successful when the condition returns
true. See Check and restart are separate.on_failureGateFailureRestarts the job from an earlier step when the gate fails. See Feedback loops.
name: Fix until tests pass
jobs:
fix:
steps:
- key: fix
prompt: Fix the failing test.
- key: test
run: pnpm test
gate:
success: step.exit_code == 0
on_failure:
restart_from: fix
steps[*].gate.on_failure
restart_fromstringRequiredSelects the earlier step where the job restarts after the gate fails.
feedbackstringProvides text that the repeated step can read after the gate fails.
name: Fix until tests pass
jobs:
fix:
steps:
- key: fix
prompt: |
Fix the failing test.
Feedback: ${{ step.is_retry ? step.restart.feedback : "No previous feedback." }}
Test log: ${{ has(step.restart) && has(step.restart.from.log_path) ? step.restart.from.log_path : "None." }}
- key: test
run: pnpm test
gate:
success: step.exit_code == 0
on_failure:
restart_from: fix
feedback: The tests still fail. Reproduce the failure first.
steps[*].outputs
<output_name>string | number | boolean | json | {type: string | number | boolean} | {type: json; schema?: value}Defines an output from the step. Set its type directly, for example
sha: string, or use an object withtype. Onlyjsonoutputs can includeschema. Withoutschema, ajsonoutput can contain any JSON value.
name: Publish outputs
jobs:
build:
steps:
- key: version
run: printf 'sha=%s\ncount=3\n' "$(git rev-parse HEAD)" >> "$SHIPFOX_OUTPUT"
outputs:
sha: string
count: number
report:
type: json
schema:
type: object
steps[*] run step
Accepts the shared step fields plus:
runstringRequiredRuns a shell command. Pass workflow values as command arguments, such as
deploy "$TARGET". Do not send them to commands such asevalorsh -c.working_directorystringSets the folder where the command runs. The path is relative to the job workspace.
envEnvironmentSets environment variables for this run step.
name: Build
jobs:
build:
steps:
- key: compile
run: |
pnpm install --frozen-lockfile
pnpm build
working_directory: apps/api
env:
NODE_ENV: production
steps[*] agent step
Accepts the shared step fields plus:
promptstringRequiredGives the agent its instructions.
harnessenumSelects the agent runtime. Shipfox uses the workspace default harness, or
piif no default exists. See Agent harness.piclaude
providerstringSelects the model provider for this step. See Model providers.
modelstringSelects the model that the agent uses.
thinkingenum | expressionSets agent reasoning.
defaultrequests the provider default without workspace or deployment overrides. Omitting this field uses configured defaults orxhigh. Available values depend on the harness. Supports workflow expressions. See Model providers.offminimallowmediumhighxhighmaxdefault
toolsstring[]Gives the agent the listed built-in tools.
Add at least one item.
integrationsIntegration[]Adds tools from integration connections to this agent step. See integrations and tools.
Add at least one item.
tool_surfaceenumIntegration tool surface for an agent step. Strict direct tools are the default; discovery retains the generic mcp proxy.
strict-directdiscovery
sessionstring | SessionContinues an agent conversation across steps in one workflow run. See Agent sessions.
Use letters, numbers, dots, underscores, or hyphens. Start with a letter or number. Use at most 128 characters.
name: Review
jobs:
review:
steps:
- key: review
prompt: Review the change and report the main risks.
harness: claude
provider: anthropic
model: claude-sonnet-5
thinking: high
tools: [read_file]
integrations:
- include: [pull_request_read]
session: review
steps[*].integrations[*]
connectionstringSelects an integration connection by its slug.
includestring[]RequiredSelects tools for the agent. See Integrations for each provider's selectors.
Add at least one item.
excludestring[]Removes tools from the
includeselection.Add at least one item.
allow_writebooleanSet to
trueto let the agent use tools that can change external data. Otherwise, the agent receives read-only tools.
name: Triage issues
jobs:
triage:
steps:
- prompt: Label the issue and post a short triage comment.
integrations:
- connection: github_acme
include: [issue_read, issue_write]
exclude: [issue_write.update]
allow_write: true
steps[*].session
keystringRequiredNames the session. Supports a ${{ }} expression.
Use letters, numbers, dots, underscores, or hyphens. Start with a letter or number. Use at most 128 characters.
modeenumDefaultresumeChooses how to continue the session.
resumecontinues and updates it.forkreads a snapshot without updating it.resumefork
name: Review
jobs:
review:
steps:
- key: draft
prompt: Review the diff and note the main risks.
session: review
- key: summary
prompt: Summarize your findings for the author.
session:
key: review
mode: fork
steps[*] tool step
toolstringRequiredCalls an integration tool by its id. Use a standalone tool or a family method such as
family.method. See Call an integration tool for an example.Use a literal value. Workflow expressions are not allowed.
connectionstringSelects an integration connection by its slug. If omitted, Shipfox uses the source integration connection of the project.
Use a literal value. Workflow expressions are not allowed.
withRecord<string, value>Provides input values to the tool. The tool defines the accepted fields. String values support workflow expressions. See Context availability.
name: Notify
jobs:
notify:
steps:
- key: message
tool: send_message
connection: slack_acme
with:
channel_id: C0ABC12345
message: Run ${{ run.number }} started.
outputs:
ts: ${{ result.ts }}
steps[*].outputs tool step
<output_name>stringCreates an output from the tool response or a workflow variable. Use one workflow expression. Later steps can read the full response from
steps.<key>.outputs.result.
name: Notify
jobs:
notify:
steps:
- key: message
tool: send_message
connection: slack_acme
with:
channel_id: C0ABC12345
message: Run ${{ run.number }} started.
outputs:
ts: ${{ result.ts }}
channel: ${{ result.channel }}
- env:
MESSAGE_TS: ${{ steps.message.outputs.ts }}
run: printf 'Posted %s\n' "$MESSAGE_TS"
steps[*] checkout step
Accepts the shared step fields plus:
checkoutCheckoutRequiredChecks out a repository for this step.
name: Compare branches
jobs:
compare:
steps:
- key: base
checkout:
ref: main
path: base
- run: diff -rq base . || true
steps[*].checkout
projectstringChecks out the repository from this Shipfox project. Do not use it with
connectionorrepository.connectionstringSelects the integration connection that can access the repository. Use it with
repository.repositorystringNames the repository to check out. Use
owner/nameor a bare repository name.refstringSelects the branch, tag, or commit to check out.
pathstringSets the destination folder under the job workspace.
fetch-depthintegerSets how many commits to fetch. Use
0for the full history.Use 0 or a larger number.
forcebooleanAllows checkout to replace existing content at the destination.
permissionsCheckoutPermissionsSets the repository permissions for this checkout.
persist-credentialsbooleanKeeps checkout credentials available to later run steps.
name: Check out a second repository
jobs:
docs:
steps:
- checkout:
connection: github_acme
repository: acme/docs
ref: main
path: docs
fetch-depth: 1
force: true
permissions:
contents: read
persist-credentials: false
- run: ls docs
steps[*].checkout.permissions
contentsenumSets read or write access to the repository contents.
readwrite
name: Push docs changes
jobs:
docs:
steps:
- checkout:
connection: github_acme
repository: acme/docs
path: docs
permissions:
contents: write
persist-credentials: true
- run: git -C docs push origin HEAD
Related pages
Contexts
Every context, its properties, and the fields that can read it.
Expressions
The syntax, operators, and functions available inside an expression.
Model Providers
Every provider ID, default model, and how agent config resolves.
Limits
Every default and cap: attempts, timeouts, log budgets, env sizes.