every push and pull request runs .github/workflows/ci.yml:
- shellcheck — lints all static
.shfiles and rendered.sh.tmploutputs. - render-templates — runs
chezmoi execute-templateacross every.tmplunderCHEZMOI_ROLE=ephemeral,headlessto catch missing keys and bad guards. a small skip list covers init-only templates that usestdinIsATTY(unavailable inexecute-templatecontext). - dry-run — matrix on
ubuntu-latestandmacos-latest:chezmoi initthenchezmoi apply --dry-runagainst a bare runner. - lint-configs — yamllint (relaxed ruleset) over tracked
.yml/.yamlfiles andtaploover tracked.tomlfiles. - plist-lint —
plutil -lintover tracked.plistfiles.
ci runs as the ephemeral,headless role so templates resolve without personal keys or interactive prompts. see scoping for how roles are defined.
fetch and apply a specific branch without changing the local source directory:
chezmoi init --apply --branch <branch-name> brendanleesto test a remote branch on a target machine, ssh in and run:
chezmoi init --apply --branch <branch-name> brendanleeschezmoi will re-initialise from the branch. previously cached state means run_once scripts
will only re-run if their content has changed.
to force re-run of once scripts (e.g. to re-test cleanup):
chezmoi state delete-bucket --bucket=scriptState
chezmoi applyto return to tracking main:
chezmoi init --apply brendanlees