Skip to content

Commit f5cf689

Browse files
committed
docs(linter): add tips for linting GitHub Actions pinning
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 02ae9bf commit f5cf689

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/linter.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ Executes:
3939

4040
<!-- overview:end -->
4141

42+
### GitHub Actions Pinning
43+
44+
**Tips:** To ensure that all GitHub Actions used in your workflows are pinned to a specific version,
45+
you can use the [Ratchet](https://github.com/sethvargo/ratchet) tool integrated into this workflow.
46+
47+
```sh
48+
docker run -it --rm -v "${PWD}:${PWD}" -w "${PWD}" -u $(id -u):$(id -g) \
49+
--env GITHUB_TOKEN=$(gh auth token) \
50+
ghcr.io/sethvargo/ratchet:latest \
51+
lint ".github/workflows/file-to-lint.yml"
52+
```
53+
4254
<!-- usage:start -->
4355

4456
## Usage

0 commit comments

Comments
 (0)