From 4e8aa1cc9359a9dbd54585763393af5a46349de0 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Wed, 29 Dec 2021 20:50:37 +0100 Subject: [PATCH 1/2] Improve Haskell example as proposed in https://github.com/actions/cache/issues/555 --- examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples.md b/examples.md index 7db0ff8..394dd1d 100644 --- a/examples.md +++ b/examples.md @@ -168,8 +168,8 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba ~/.cabal/packages ~/.cabal/store dist-newstyle - key: ${{ runner.os }}-${{ matrix.ghc }} -``` + key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} + restore-keys: cabal-${{ runner.os }}-${{ matrix.ghc }}-``` ## Java - Gradle From c64c5261d3b5f10d340de97191b74844f02fbe53 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Thu, 30 Dec 2021 11:54:15 +0100 Subject: [PATCH 2/2] Fix syntax --- examples.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples.md b/examples.md index 394dd1d..8921857 100644 --- a/examples.md +++ b/examples.md @@ -168,8 +168,9 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba ~/.cabal/packages ~/.cabal/store dist-newstyle - key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} - restore-keys: cabal-${{ runner.os }}-${{ matrix.ghc }}-``` + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.freeze') }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- +``` ## Java - Gradle