Skip to main content

Version Files

version.files declares which files carry managed versions. atmos version track apply rewrites those files from the lock file, and verify fails when they drift.

Configuration

atmos.yaml
version:
files:
- manager: github-actions
paths:
- .github/workflows/*.yaml
- .github/workflows/*.yml

- manager: marker
paths:
- Dockerfile
- scripts/**/*.sh

- manager: template
paths:
- "**/*.tmpl"

When version.files is empty, managers with default paths run over those defaults.

Managers

github-actions
Rewrites uses: refs in workflow files by matching owner/repo packages.
marker
Rewrites version tokens on lines annotated with atmos:version comments.
template
Renders *.tmpl source files to sibling files using the .version context.

Updating Dockerfiles

Annotate the line to update with an atmos:version comment. The marker manager rewrites the version token in place from the lock file, matching entries by name. Given this atmos.yaml:

atmos.yaml
version:
dependencies:
opentofu:
ecosystem: toolchain
datasource: toolchain
package: opentofu
desired: "~1.12"

terraform:
ecosystem: toolchain
datasource: toolchain
package: terraform
desired: "~1.15"

files:
- manager: marker
paths:
- Dockerfile

atmos version track apply prod keeps annotated lines in sync with the locked versions:

Dockerfile
# atmos:version opentofu
ENV TOFU_VERSION=1.12.4

Updating GitHub Action Workflows

The github-actions manager rewrites uses: refs in workflow files, matching entries by owner/repo package.

Add a dependency for the action and register the manager:

atmos.yaml
version:
dependencies:
checkout:
ecosystem: github/actions
datasource: github-tags
provider: github
package: actions/checkout
desired: "v6"

files:
- manager: github-actions
paths:
- .github/workflows/*.yaml

atmos version track apply prod rewrites the matching uses: line to the locked version:

.github/workflows/ci.yaml
steps:
- uses: actions/checkout@v6

Examples

atmos version track apply prod
atmos version track apply prod --check
atmos version track apply prod --manager=github-actions