File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9898
9999 # Use a fresh cache each month
100100 - name : Store month number as environment variable used in cache version
101- run : echo "MONTHNUM=$(date -u '+%m')" >> $GITHUB_ENV
101+ run : |
102+ cat <<EOF >> $GITHUB_ENV
103+ MONTHNUM=$(date -u '+%m')
104+ GHC=$(ghc --numeric-version)
105+ EOF
102106
103107 # From the dependency list we restore the cached dependencies.
104108 # We use the hash of `dependencies.txt` as part of the cache key because that will be stable
@@ -111,10 +115,10 @@ jobs:
111115 ${{ steps.setup-haskell.outputs.cabal-store }}
112116 dist-newstyle
113117 key :
114- cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.MONTHNUM }}-${{ hashFiles('dependencies.txt') }}
118+ cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ env.GHC }}-${{ env.MONTHNUM }}-${{ hashFiles('dependencies.txt') }}
115119 # try to restore previous cache from this month if there's no cache for the dependencies set
116120 restore-keys : |
117- cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.MONTHNUM }}-
121+ cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ env.GHC }}-${{ env.MONTHNUM }}-
118122
119123 # Now we install the dependencies. If the cache was found and restored in the previous step,
120124 # this should be a no-op, but if the cache key was not found we need to build stuff so we can
You can’t perform that action at this time.
0 commit comments