diff --git a/README.md b/README.md index 2f4ff91..1e83069 100644 --- a/README.md +++ b/README.md @@ -31,28 +31,6 @@ See `nix/ci/default.nix` for action configuration in `nix`. This is turned by th `pre-commit` hook, or by running `nix run .#render-workflows`, into the workflow file in `.github/workflows/main.yaml`. -### Advanced: control relative path with `--no-prepend-git-root` - -By default, workflow files will be rendered relative to the git repo root. To write workflow files relative to the process working directory (CWD), run: - -``` -nix run .#render-workflows -- --no-prepend-git-root -``` - -This is useful when you want files output somewhere *other* than the git root (e.g., when scripting or testing in a subdirectory). - -#### Passing the flag in pre-commit configuration - -If you need to add arguments (such as `--no-prepend-git-root`) to the pre-commit hook invocation, you can do so, e.g., using the `raw.args` option in your Nix flake configuration: - -```nix -pre-commit.settings.hooks.render-actions = { - raw.args = [ - "--no-prepend-git-root" - ]; -}; -``` - ## Installation This project uses `flake-parts`. You need to add the module exposed by this @@ -70,7 +48,7 @@ repository and configure your own workflows. }); ``` -## Note on `git-hooks` import collisions +### Note on `git-hooks` import collisions The `actions-nix` module automatically imports `git-hooks`. If you also explicitly import `git-hooks` in your downstream project, and the versions @@ -119,6 +97,30 @@ actions-nix = { Let `actions-nix` handle the import, and avoid importing `git-hooks` directly. +## Advanced + +### Control relative path with `--no-prepend-git-root` + +By default, workflow files will be rendered relative to the git repo root. To write workflow files relative to the process working directory (CWD), run: + +``` +nix run .#render-workflows -- --no-prepend-git-root +``` + +This is useful when you want files output somewhere *other* than the git root (e.g., when scripting or testing in a subdirectory). + +#### Passing the flag in pre-commit configuration + +If you need to add arguments (such as `--no-prepend-git-root`) to the pre-commit hook invocation, you can do so, e.g., using the `raw.args` option in your Nix flake configuration: + +```nix +pre-commit.settings.hooks.render-actions = { + raw.args = [ + "--no-prepend-git-root" + ]; +}; +``` + ## About This is a work-in-progress project. My plan is to implement all