Skip to content

Use rootform-dev/action/init@v1 to prepare project content before analysis, checking or an offline step. It installs Rootform itself. The analyze, compare, and check Actions install Rootform and prepare selected content when needed, so a separate init step is optional.

Prepare an existing locked project YAML
- uses: rootform-dev/action/init@v1
with:
version: 0.1.0
project: ./infra
locked: true

The example requires infra/rootform.lock. project defaults to the workspace; locked: true requires and preserves the existing lock. The Action never creates or edits it. It prepares only external Dialect and Policy Pack sources, not Terraform modules, plans or provider credentials.

Later Rootform steps share the job's ROOTFORM_HOME. The default cache retains only external source payloads selected by that lock, and restored content is verified again. offline: true prepares verified local content only; it does not prevent a required CLI installation download. Use a prior setup step when installation must happen before the offline phase.

Init's only output is version. It produces no Form, report, Summary, artifact or PR comment. It rejects pull_request_target before installation. See installation and project content.

Inputs

Type describes accepted values. GitHub passes all inputs as strings. bool accepts true or false. An empty default leaves the input unset.

InputTypeDefaultDescription
versionstring""Exact published version; omit to reuse a verified version in this job
github-tokenstring${{ github.token }}GitHub token for release API requests
projectstring""Project directory for raw evidence or Policy selection; defaults to workspace
lockedboolfalseRequire and preserve existing rootform.lock
offlineboolfalsePrepare selected external content without network access
cachebooltrueCache verified external sources selected by rootform.lock

Outputs

OutputDescription
versionVerified Rootform CLI version

Exact fields and defaults: Action metadata.