Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 25 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down