Skip to content

Commit fae68d8

Browse files
committed
ci(gitlab-ci): improve pre-commit caching
* with the previous setting the stored cache would grow and grow as long as the job name remained the same
1 parent fd7ca9c commit fae68d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ pre-commit:
8181
variables:
8282
PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit'
8383
cache:
84-
key: '${CI_JOB_NAME}'
84+
key:
85+
files:
86+
- .pre-commit-config.yaml
87+
prefix: pre-commit
8588
paths:
8689
- '${PRE_COMMIT_HOME}'
8790
script:

0 commit comments

Comments
 (0)