File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 name : Build OpenWRT ${{ matrix.version }} for ${{ matrix.lunch }}
1616 runs-on : ubuntu-latest
1717
18+ env :
19+ cache-key : ${{ runner.os }}-${{ matrix.version }}-${{ matrix.lunch }}
20+
1821 strategy :
1922 fail-fast : false
2023 matrix :
3134 uses : actions/cache/restore@v3
3235 with :
3336 path : openwrt-builder
34- key : ${{ runner.os }}-${{ matrix.version }}-${{ matrix.lunch }}
37+ key : ${{ env.cache-key }}
3538
3639 - name : Check if the OpenWRT builder exists
3740 id : check
9497 clean
9598 cd ..
9699
100+ - name : Delete previous cache before saving new
101+ if : ${{ steps.restore-cache.outputs.cache-hit }}
102+ continue-on-error : true
103+ run : |
104+ gh extension install actions/gh-actions-cache
105+ gh-actions-cache delete "${{ env.cache-key }}" --confirm
106+ env :
107+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108+
97109 - name : Save OpenWRT builder cache
98110 uses : actions/cache/save@v3
99111 with :
100112 path : openwrt-builder
101- key : ${{ steps.restore- cache.outputs.cache-primary -key }}
113+ key : ${{ env. cache-key }}
You can’t perform that action at this time.
0 commit comments