run-pre-commit: stage: .pre image: unbound/pre-commit:v0.3.9@sha256:a6744b1d4ad73fb078b528b094c3a4b26444d17c60dc6dce51e8531fae2c96dc variables: PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit GOPRIVATE: gitlab.com/unboundsoftware cache: - key: files: - .pre-commit-config.yaml paths: - ${PRE_COMMIT_HOME} before_script: - echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc script: - pre-commit run --all-files