From 56bc4338f06c54080dce0faf2f3ca2faca9718a9 Mon Sep 17 00:00:00 2001
From: Daniel Rainer <daniel.m.rainer@student.uibk.ac.at>
Date: Sat, 5 Mar 2022 17:04:26 +0100
Subject: [PATCH] Use cache only for single commit

---
 .gitlab-ci.yml | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dca57eeb5..447e60ac6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,9 +19,7 @@ npm-install:
   script:
     - npm install
   cache:
-    key:
-      files:
-        - package-lock.json
+    key: '$CI_COMMIT_REF_NAME'
     paths:
       - node_modules/
     policy: pull-push
@@ -43,9 +41,7 @@ prettier:
   allow_failure: true
   needs: [npm-install]
   cache:
-    key:
-      files:
-        - package-lock.json
+    key: '$CI_COMMIT_REF_NAME'
     paths:
       - node_modules/
     policy: pull
@@ -59,9 +55,7 @@ eslint:
   allow_failure: true
   needs: [npm-install]
   cache:
-    key:
-      files:
-        - package-lock.json
+    key: '$CI_COMMIT_REF_NAME'
     paths:
       - node_modules/
     policy: pull
@@ -127,9 +121,7 @@ frontend-test:
   allow_failure: true
   needs: [npm-install]
   cache:
-    key:
-      files:
-        - package-lock.json
+    key: '$CI_COMMIT_REF_NAME'
     paths:
       - node_modules/
     policy: pull
-- 
GitLab