From af4c6886b6181321fd15ff2638e0e3d61663f8a9 Mon Sep 17 00:00:00 2001 From: Tim Balsfulland Date: Tue, 19 Dec 2023 22:03:20 +0100 Subject: [PATCH] only save cache when it wasn't hit before --- .github/workflows/test.yml | 2 +- action.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fbd9a9e7..45009c09b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: - name: Checkout source code uses: actions/checkout@v3 - name: Run CogniCrypt - uses: Timbals/CryptoAnalysis@8894fae7b78de54fadd3de2d6cd5a77138e0b3df + uses: Timbals/CryptoAnalysis@a4032930f0a7b3bdb761130eae8d2229c9534b0a with: rulesDir: "$(pwd)/JCA-CrySL-rules" appPath: "$(pwd)/CryptoAnalysisTargets/CogniCryptDemoExample/Examples.jar" diff --git a/action.yml b/action.yml index f36a858f3..c030e2d15 100644 --- a/action.yml +++ b/action.yml @@ -80,10 +80,9 @@ runs: if: steps.cache.outputs.cache-hit != 'true' shell: bash run: cp CryptoAnalysisBuild_98e04be6/CryptoAnalysis/build/CryptoAnalysis-*-jar-with-dependencies.jar CryptoAnalysisBuild_98e04be6/CryptoAnalysis.jar - - name: Save CryptoAnalysis Cache uses: actions/cache/save@v3 - if: always() + if: steps.cache.outputs.cache-hit != 'true' with: path: CryptoAnalysisBuild_98e04be6/CryptoAnalysis.jar key: ${{ steps.cache-key.outputs.cache-key }}