run-pre-commit: stage: .pre image: unbound/pre-commit:v0.2.1@sha256:28eaccf47ce8f5343cc9e7787da7e77f47bb01dccc1d5a3b200fd7f1211bd51c 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