Actions Reference
Every step names an action in uses. Each action has its own page below, with
its parameters, the res object it returns, and worked examples. The rules that
hold for all of them are at the end of this page.
Built-in actions
- http - Make HTTP/HTTPS requests and validate responses
- db - Execute database queries on MySQL, PostgreSQL, and SQLite
- shell - Execute shell commands and scripts securely
- ssh - Run commands on a remote host over SSH
- smtp - Send email notifications and alerts
- imap - Connect to IMAP servers and manage email operations
- grpc - Call gRPC services by reflection
- embedded - Run another workflow as a step
- hello - Simple test action for development and debugging
External actions
These are published alongside Probe, each in a repository of its own. A step names one by repository and commit, and Probe downloads it the first time a workflow uses it. See External Actions.
- browser - Drive a real Chrome with chromedp
- graphql - Send a GraphQL query over HTTP
- jmap - Call JMAP methods
- mail-latency - Measure delivery latency from a Maildir
Action Error Handling
A step fails when its test is false or when the action itself returns an error. The remaining steps of the job still run, the job is marked failed, and jobs that list it in needs are skipped.
There is no switch to ignore a failure. When a check should not fail the workflow, record its result as an output instead of asserting it.
steps:
- name: Required check
uses: http
with:
method: GET
url: "{{vars.api_url}}/health"
test: res.code == 200
- name: Optional check
id: optional
uses: http
with:
method: GET
url: "{{vars.api_url}}/experimental"
outputs:
available: res.code == 200
detail: 'res.code >= 400 ? res.status : ""'
- name: Report
uses: hello
echo: "Experimental endpoint: {{outputs.optional.available ? \"available\" : outputs.optional.detail}}"Use retry for a transient failure and timeout for a step that may hang:
- name: Flaky endpoint
uses: http
timeout: 10s
retry:
max_attempts: 3
interval: 2s
with:
method: GET
url: "{{vars.api_url}}/flaky"
test: res.code == 200Performance Considerations
- Jobs without a
needsrelation run in parallel, so independent checks do not queue behind each other. rt.secandrt.durationmeasure the action’s round trip, not the whole step.- A large response body is held in memory; a binary body is written to a file and reported as
res.filepath. repeatwithasync: trueruns the repetitions of a job concurrently, which is the way to generate load.
jobs:
- name: Load test
repeat:
count: 50
async: true
steps:
- name: Ping
uses: http
timeout: 2s
with:
method: GET
url: "{{vars.api_url}}/ping"
test: res.code == 200 && rt.sec < 0.5See Also
- YAML Configuration - Complete YAML syntax reference
- Built-in Functions - Expression functions for use with actions
- SSH Action - Running commands on a remote host
- Concepts: Actions - Action system architecture
- How-tos: API Testing - Practical HTTP action examples