ci: add pre-commit

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-05-24 15:44:26 +02:00
parent ea9a1d785a
commit 56359109a9
Signed by: mfocko
GPG key ID: 7C47D46246790496

View file

@ -8,3 +8,14 @@ pages:
- public
only:
- main
pre-commit:
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
paths:
- ${PRE_COMMIT_HOME}
image: registry.gitlab.com/yesolutions/docker-pre-commit
script:
- pip install pre-commit
- pre-commit run --all-files