params
Typed compile-time inputs interpolated with double-brace tokens.
A workflow that hardcodes the same env name, image tag, or retry count across
several jobs and steps drifts the moment one copy changes. params declares those
values once as typed, validated compile-time inputs; reference scalars with
{{ params.x }} and objects/lists with {{ toJSON(params.x) }}. The values are
resolved by actio build and baked into the generated YAML:
name: Deploy
on: [push]
params:
env:
type: enum
values: [dev, staging, prod]
default: staging
retries:
type: number
default: 3
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "env={{ params.env }} retries={{ params.retries }}"jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "env=staging retries=3"name: Deploy
on: [push]
params:
env:
type: enum
values: [dev, staging, prod]
default: staging
retries:
type: number
default: 3
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "env={{ params.env }} retries={{ params.retries }}"jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "env=staging retries=3"params vs reusable.inputs
Both feed values into a workflow, at different times. params are compile-time:
actio build resolves them and bakes the result into the output, so there is no
runtime params (and ${{ params.* }} is invalid). reusable.inputs
are runtime inputs a caller or dispatcher sets per run. Use params to
deduplicate build-time constants; use reusable.inputs when the value must vary per
invocation.
See interpolation tokens for the full {{ }}
vs ${{ }} rules.