Container image for our pre-commit hooks
Find a file
Henrik Hüttemann 4e449c56a7
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline failed
Add README
2024-06-20 12:00:53 +02:00
.dockerignore Run pre-commit to warm up cache 2024-06-19 17:18:32 +02:00
.editorconfig Run pre-commit to warm up cache 2024-06-19 17:18:32 +02:00
.markdown-style.rb Add README 2024-06-20 12:00:53 +02:00
.mdlrc Add README 2024-06-20 12:00:53 +02:00
.pre-commit-config.yaml Update gitleaks to use native hook 2024-06-20 11:37:19 +02:00
.prettierrc.yaml Run pre-commit to warm up cache 2024-06-19 17:18:32 +02:00
.woodpecker.yaml Run pre-commit to warm up cache 2024-06-19 17:18:32 +02:00
Dockerfile Run pre-commit to warm up cache 2024-06-19 17:18:32 +02:00
README.md Add README 2024-06-20 12:00:53 +02:00
renovate.json Run pre-commit to warm up cache 2024-06-19 17:18:32 +02:00

verdigado pre-commit container

A container image to include all dependencies (and a warmed up cache) used in our pre-commit hooks/CI steps to speed up execution.

If you see any pre-commit CI jobs installing dependencies:

  • Make sure to execute pre-commit using this container
  • Add the hook to this repo's .pre-commit-config.yaml
  • Optionally install dependencies in the Dockerfile with the versions set up for Renovate

Usage

In your .woodpecker.yaml, adapt and add the following block:

steps:
  check-pre-commit:
    image: git.verdigado.com/verdigado-images/container-pre-commit:latest
    environment:
      - SKIP=no-commit-to-branch # Ignore "don't commit to protected branch" check
    commands:
      - pre-commit run --all-files

If renovate is set up, it'll add and update the pinned digest/hash of the image.

Development

If you need to copy files into the container, don't forget to add exclusions to the general exclude all in .dockerignore.

To update the base image (like 3.12.4-alpine3.20 to a newer Alpine version), manual work is still required. In the Dockerfile, update the Alpine version for the image, the renovate comments (# renovate: datasource=repology depName=alpine_3_20/gcc versioning=loose), and the package versions for that OS version from the repo (Like on the Alpine Package Page for gcc).