Skip to content

Commit df102ec

Browse files
committed
👷 repopulate cache
1 parent 8301859 commit df102ec

2 files changed

Lines changed: 24 additions & 6 deletions

File tree

.github/actions/data-cache/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ runs:
7070
popd
7171
7272
mkdir -p sources/5etools-img
73-
gh release download ${LATEST_5E_VERSION} -D sources/5etools-img -R 5etools-mirror-3/5etools-img
73+
git clone --quiet --depth=1 -b ${LATEST_5E_VERSION} \
74+
-c advice.detachedHead=false \
75+
--no-checkout \
76+
https://github.com/5etools-mirror-3/5etools-img.git sources/5etools-img
7477
pushd sources/5etools-img
75-
zip -FF img-${LATEST_5E_VERSION}.zip --out fixed.zip
76-
unzip -q fixed.zip
77-
rm *.z*
7878
du -sh .
79+
ls -al
7980
# replace all images w/ empty files. We don't care about image content for test purposes
80-
find img -type f | while read FILE; do echo > "$FILE"; done
81-
mv img/* .
81+
find . -type f | while read FILE; do echo > "$FILE"; done
8282
du -sh .
8383
popd
8484

.github/workflows/cache.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Refresh cache
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
cache:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
cache_key: ${{ steps.data_cache.outputs.cache_key }}
10+
steps:
11+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
12+
13+
- id: data_cache
14+
uses: ./.github/actions/data-cache
15+
16+
- uses: ./.github/actions/native-data-cache
17+
with:
18+
cache_key: ${{ steps.data_cache.outputs.cache_key }}

0 commit comments

Comments
 (0)