Repository navigation
Commit 218f385
authored
fix(ci): pin hadolint image by digest to stop drift off the rev pin (#1697)
The hadolint-docker pre-commit hook's upstream entry
(ghcr.io/hadolint/hadolint hadolint) carries no image tag, so it floats
to :latest regardless of the hadolint/hadolint repo's rev: v2.14.0 pin
in .pre-commit-config.yaml, which only fixes the hook *definition*, not
the Docker image it runs. Upstream publishing hadolint 2.15.1 as latest
started failing pre-commit --all-files on every PR (new DL3066/DL3025
findings on unchanged Dockerfiles), since that job lints the whole
merge ref rather than the PR's diff.
Replace it with a local hook pinned to the immutable digest of the
same v2.14.0 image so the linter version can only change via an
explicit bump here. No Dockerfile changes were needed; verified
Dockerfile, Dockerfile.dev, and Dockerfile.test all still build.
Also corrects a stale comment in .github/workflows/pre-commit.yml that
had assumed the old hook was already image-pinned via the rev.
Closes #16961 parent cd4ee03 commit 218f385
2 files changed
Lines changed: 29 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
68 | 80 | | |
69 | | - | |
| 81 | + | |
70 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
71 | 86 | | |
72 | 87 | | |
73 | 88 | | |
| |||
0 commit comments