Workflow reference
Schema, YAML examples, provider push behavior, expressions, and conditional routing for Formatio deployment workflows.
The visual workflow canvas and the YAML/JSON code view edit the exact same steps definition. Every step has a unique name, a type, params, and optional next edges forming a directed graph with no cycles.
Deploy-on-push template
Replace REPLACE_CONNECTION_UUID, REPLACE_REPOSITORY_ID, and REPLACE_APPLICATION_UUID using the pickers in the visual editor so Formatio stores stable IDs rather than mutable repository names.
steps:
- name: Git push
type: git-event
params:
type: push
connection_id: REPLACE_CONNECTION_UUID
repository_id: 'REPLACE_REPOSITORY_ID'
repository_path: team/service
branches:
- main
paths:
- 'apps/api/**'
- 'packages/shared/**'
- '!**/*.md'
next:
- Deploy API
- name: Deploy API
type: deploy
params:
application: REPLACE_APPLICATION_UUID
strategy: ''
[!TIP] Include shared lockfiles, Dockerfiles, and monorepo package directories inside
pathswhenever edits there affect your application build. Removepathsentirely if every commit on matching branches should trigger a deploy.
Git provider push semantics
Tabs
GitHub
repository_pathusesowner/repo(for exampleacme/api).- GitHub App installations only fire pushes for repositories explicitly granted to the installed App (unless All repositories was authorized).
- Push payloads supply added, modified, and removed file lists directly for
pathsglob matching.
GitLab
repository_pathsupports nested groups (for exampleacme/platform/billing-api).- GitLab does not dispatch webhook events for a single push updating more than three branches or tags (GitLab's
push_event_hooks_limit); avoid pushing four or more new tags in a singlegit push --tagscommand if every tag must trigger a build.
Bitbucket
- A single push updating multiple branches runs each branch's matching workflows once.
- Because Bitbucket push webhooks omit changed file paths, Formatio queries Bitbucket's diffstat API to evaluate
pathsfilters; if diffstat retrieval fails upstream, the workflow runs rather than silently dropping the deploy.
Azure DevOps
- A single push can update multiple branches and tags independently.
- Formatio fetches changed file paths from Azure DevOps commit diffs when
pathsfilters are configured. - Pusher badges in activity timelines render initials rather than upstream profile avatars because Azure DevOps avatar URLs require interactive sign-in.
Step types
| Type | Parameters | Behavior |
|---|---|---|
git-event |
type, connection_id, repository_id, repository_path, optional branches, tags, paths |
Matches incoming push events against ref and path globs |
deploy |
application, optional strategy |
Builds and releases the target application and waits for rollout completion |
condition |
left, operator, optional right |
Evaluates a predicate and selects the outgoing edge labeled true or false |
switch |
value, cases |
Evaluates value against ordered patterns and selects the first matching label or default |
[!NOTE]
github-eventsteps from pre-connection workflows continue executing on push; opening and saving them in the workflow editor converts the step cleanly togit-event.
Expressions
Step parameters can interpolate trigger metadata and upstream step outputs. Step names normalize to lowercase with spaces removed (Deploy API becomes deployapi), so keep normalized step names distinct across the graph.
| Expression | Meaning |
|---|---|
{{ trigger.branch }} |
Trigger branch or tag name |
{{ trigger.ref }} |
Full Git ref, such as refs/heads/main |
{{ trigger.reference }} |
Triggering commit revision SHA |
{{ trigger.changed_files }} |
Changed file paths reported for the push |
{{ steps.deployapi.status }} |
Outcome (successful, failed, or skipped) of step Deploy API |
{{ steps.deployapi.payload.ref }} |
Git ref deployed by that step |
Condition edges
Route downstream deploys on true and false labels:
- name: Choose environment
type: condition
params:
left: '{{ trigger.branch }}'
operator: eq
right: main
next:
- to: Deploy production
when: 'true'
- to: Deploy staging
when: 'false'
Supported comparison operators are eq, ne, contains, not_contains, matches (glob pattern), gt, lt, gte, lte, truthy, and empty. Numeric comparisons (gt, lt, gte, lte) expect numeric operands; truthy and empty ignore right.
Switch edges
A switch step compares value against ordered cases patterns and follows the edge whose when label matches first, falling back to default if no case matches.
- A bare string in
next(such as- Deploy API) is an unlabeled edge followed unconditionally. - An object in
next(such as{ to: Deploy production, when: "true" }) is a labeled edge selected by aconditionorswitchstep.
Verify changes
Save the workflow, confirm its status toggle is enabled, and push a test commit matching the configured branch or path filters. If a push does not appear on the target application's Deployments tab, check repository access under Git providers, verify the repository_id, and review exclusion ordering in paths.