on master help sign in
Use restore keys
6916751iko
.github/actions/common_setup/action.yaml+4
@@ -4,6 +4,9 @@ inputs:
4 key:
4 key:
5 description: "Caching key"
5 description: "Caching key"
6 required: true
6 required: true
7+ restore-keys:
8+ description: "Restore keys"
9+ required: false
7runs:
10runs:
8 using: "composite"
11 using: "composite"
9 steps:
12 steps:
@@ -19,3 +22,4 @@ runs:
19 uses: ./.github/actions/nix_cache
22 uses: ./.github/actions/nix_cache
20 with:
23 with:
21 key: ${{ inputs.key }}
24 key: ${{ inputs.key }}
25+ restore-keys: ${{ inputs.restore-keys }}
.github/workflows/github-actions-image.yaml+6−7
@@ -31,12 +31,11 @@ jobs:
31 - name: Common setup
31 - name: Common setup
32 uses: ./.github/actions/common_setup
32 uses: ./.github/actions/common_setup
33 with:
33 with:
34− key: |
35− Linux-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**.cabal') }}
34+ key: Linux-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**.cabal') }}
35+ restore-keys: |
36 Linux-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}
36 Linux-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}
37 Linux-${{ hashFiles('**.nix') }}
37 Linux-${{ hashFiles('**.nix') }}
38 Linux
38 Linux
39−
40 - name: Build Linux static binary
39 - name: Build Linux static binary
41 shell: bash
40 shell: bash
42 run: |
41 run: |
@@ -124,8 +123,8 @@ jobs:
124 - name: Common setup
123 - name: Common setup
125 uses: ./.github/actions/common_setup
124 uses: ./.github/actions/common_setup
126 with:
125 with:
127− key: |
128− macOS-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**.cabal') }}
126+ key: macOS-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**.cabal') }}
127+ restore-keys: |
129 macOS-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}
128 macOS-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}
130 macOS-${{ hashFiles('**.nix') }}
129 macOS-${{ hashFiles('**.nix') }}
131 macOS
130 macOS
@@ -171,8 +170,8 @@ jobs:
171 - name: Common setup
170 - name: Common setup
172 uses: ./.github/actions/common_setup
171 uses: ./.github/actions/common_setup
173 with:
172 with:
174− key: |
175− Linux-Windows-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**.cabal') }}
173+ key: Linux-Windows-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('**.cabal') }}
174+ restore-keys: |
176 Linux-Windows-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}
175 Linux-Windows-${{ hashFiles('**.nix') }}-${{ hashFiles('stack.yaml') }}
177 Linux-Windows-${{ hashFiles('**.nix') }}
176 Linux-Windows-${{ hashFiles('**.nix') }}
178 Linux-Windows
177 Linux-Windows