# params (/docs/macros/params)



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:

<CodeCompare>
  ```yaml title=".actio.yml"
  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 }}"
  ```

  ```yaml title="generated .yml"
  jobs:
    deploy:
      runs-on: ubuntu-latest
      steps:
        - run: echo "env=staging retries=3"
  ```
</CodeCompare>

## params vs `reusable.inputs` [#params-vs-reusableinputs]

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`](/docs/macros/reusable)
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](/docs/syntax#interpolation-tokens) for the full `{{ }}`
vs `${{ }}` rules.


## Sitemap

Browse the full documentation: [Markdown sitemap](https://austenstone.github.io/actio/sitemap.md) · [XML sitemap](https://austenstone.github.io/actio/sitemap.xml)