Skip to content

Commit 5608a7a

Browse files
committed
ci: fix cache key
1 parent ce6713c commit 5608a7a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/stack-build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252

5353
- name: Configure the build
5454
run: |
55-
echo "with key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}"
55+
echo "with key: ${{ runner.os }}-lts-${{ matrix.stack.lts }}"
56+
echo "stack root: ${{ steps.setup.outputs.stack-root }}
5657
5758
stack config set resolver lts-${{ matrix.stack.lts }}
5859
stack build --dry-run
@@ -62,17 +63,18 @@ jobs:
6263
uses: actions/cache/restore@v3
6364
id: cache
6465
env:
65-
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
66+
key: ${{ runner.os }}-lts-${{ matrix.stack.lts }}
6667

6768
with:
6869
path: ${{ steps.setup.outputs.stack-root }}
69-
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
70+
key: ${{ env.key }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }}
7071
restore-keys: ${{ env.key }}-
7172

7273
- name: Install dependencies
7374
run: stack build --only-dependencies
7475

75-
# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
76+
# Cache dependencies already here, so that we do not have to rebuild them
77+
# should the subsequent steps fail.
7678
- name: Save cached dependencies
7779
uses: actions/cache/save@v3
7880
# Caches are immutable, trying to save with the same key would error.

0 commit comments

Comments
 (0)