Skip to content
Snippets Groups Projects
Commit 7a46c8ec authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

ci: cache apk packages

parent 16a6b822
No related branches found
No related tags found
1 merge request!61Add pre-commit hooks
......@@ -40,9 +40,12 @@ Check licenses:
Check style:
variables:
APK_CACHE_DIR: ${CI_PROJECT_DIR}/apk-cache
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/pre-commit
before_script:
- apk add git pre-commit
- mkdir -p "${APK_CACHE_DIR}"
- apk update --cache-dir "${APK_CACHE_DIR}"
- apk add --cache-dir "${APK_CACHE_DIR}" git pre-commit
script:
- pre-commit run --show-diff-on-failure --color=always --all-files
tags:
......@@ -53,11 +56,14 @@ Check style:
- when: always
interruptible: true
cache:
key:
files:
- .pre-commit-config.yaml
paths:
- ${PRE_COMMIT_HOME}
- key: ${CI_COMMIT_REF_SLUG}
paths:
- ${APK_CACHE_DIR}
- key:
files:
- .pre-commit-config.yaml
paths:
- ${PRE_COMMIT_HOME}
include:
- project: "anw_dienste/ci-templates"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment