Skip to content

Commit ac6f17d

Browse files
committed
tweak entropy of link check cache
1 parent 6638e72 commit ac6f17d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,20 @@ jobs:
105105
with:
106106
name: docs ${{ github.run_number }}
107107
path: ./docs/build
108+
- name: Get current date
109+
id: date
110+
run: |
111+
echo "::set-output name=year::$(date +'%Y')"
112+
echo "::set-output name=week::$(date +'%U')"
108113
- name: Cache links
109114
uses: actions/cache@v1
110115
with:
111116
path: ./build/links
112-
key: ${{ runner.os }}-links
117+
key: |
118+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-links-${{ steps.date.outputs.year }}-${{ steps.date.outputs.week }}
119+
restore-keys: |
120+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-links-${{ steps.date.outputs.year }}-
121+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-links-
113122
- name: Check links
114123
run: |
115124
set -eux

0 commit comments

Comments
 (0)