Skip to content

Commit c001317

Browse files
authored
feat: add pre-commit-hooks config (#43)
1 parent 4b39de6 commit c001317

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

.pre-commit-hooks.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- id: embd-status
2+
name: embd status
3+
description: Check for embedded file drift with `embd status`.
4+
entry: embd status
5+
language: rust
6+
pass_filenames: false

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,21 @@ jobs:
8585
The `args` input overrides the command (default `status`), so you can scope the check to specific embeds or run quietly:
8686

8787
```yaml
88-
- uses: ptsouchlos/embd@v0
89-
with:
90-
args: status --quiet infra
88+
- uses: ptsouchlos/embd@v0
89+
with:
90+
args: status --quiet infra
91+
```
92+
93+
## Use as a pre-commit hook
94+
95+
You can run `embd status` via [pre-commit](https://pre-commit.com/) or [`prek`](https://github.com/j178/prek) by adding this to your `.pre-commit-config.yaml`:
96+
97+
```yaml
98+
repos:
99+
- repo: https://github.com/ptsouchlos/embd
100+
rev: v0.1.2 # pin to a released tag
101+
hooks:
102+
- id: embd-status
91103
```
92104

93105
## Credits

0 commit comments

Comments
 (0)