Skip to content

Commit

Permalink
👷 keep existing cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Aug 13, 2024
1 parent 44c3e5c commit 329d762
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/tools-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
- name: Tools release cache key
id: test-data-key
run: |
LATEST_RELEASE=$(curl -sLH 'Accept: application/json' https://api.github.com/repos/5etools-mirror-2/5etools-mirror-2.github.io/releases/latest)
LATEST_VERSION=$(echo $LATEST_RELEASE | grep tag_name | sed -e 's/.*"tag_name": "\([^"]*\)".*/\1/')
echo $LATEST_VERSION
# LATEST_RELEASE=$(curl -sLH 'Accept: application/json' https://api.github.com/repos/5etools-mirror-2/5etools-mirror-2.github.io/releases/latest)
# LATEST_VERSION=$(echo $LATEST_RELEASE | grep tag_name | sed -e 's/.*"tag_name": "\([^"]*\)".*/\1/')
# echo $LATEST_VERSION
LATEST_VERSION="v1.209.3"
echo "🔹 Use $LATEST_VERSION"
echo "tools_version=${LATEST_VERSION}" >> $GITHUB_OUTPUT
Expand All @@ -55,23 +56,23 @@ jobs:
run: |
mkdir -p sources
echo "🔹 Download $LATEST_VERSION"
ARTIFACT_URL="https://github.com/5etools-mirror-2/5etools-mirror-2.github.io/archive/refs/tags/$LATEST_VERSION.tar.gz"
VER=$(echo $LATEST_VERSION | cut -c 2-)
ROOT="5etools-mirror-2.github.io-$VER"
# echo "🔹 Download $LATEST_VERSION"
# ARTIFACT_URL="https://github.com/5etools-mirror-2/5etools-mirror-2.github.io/archive/refs/tags/$LATEST_VERSION.tar.gz"
# VER=$(echo $LATEST_VERSION | cut -c 2-)
# ROOT="5etools-mirror-2.github.io-$VER"
curl -LsS -o 5etools.tar.gz $ARTIFACT_URL
tar xzf 5etools.tar.gz ${ROOT}/data
mv ${ROOT} sources/5etools-mirror-2.github.io
# curl -LsS -o 5etools.tar.gz $ARTIFACT_URL
# tar xzf 5etools.tar.gz ${ROOT}/data
# mv ${ROOT} sources/5etools-mirror-2.github.io
gh repo clone 5etools-mirror-2/5etools-img sources/5etools-img -- --depth=1
gh repo clone TheGiddyLimit/unearthed-arcana sources/5e-unearthed-arcana -- --depth=1
gh repo clone TheGiddyLimit/homebrew sources/5e-homebrew -- --depth=1
# gh repo clone 5etools-mirror-2/5etools-img sources/5etools-img -- --depth=1
# gh repo clone TheGiddyLimit/unearthed-arcana sources/5e-unearthed-arcana -- --depth=1
# gh repo clone TheGiddyLimit/homebrew sources/5e-homebrew -- --depth=1
# Remove image contents. We just need the files to exist (linking)
find sources -type f -type f \
\( -iname \*.jpg -o -iname \*.png -o -iname \*.webp \) \
| while read FILE; do echo > "$FILE"; done
# # Remove image contents. We just need the files to exist (linking)
# find sources -type f -type f \
# \( -iname \*.jpg -o -iname \*.png -o -iname \*.webp \) \
# | while read FILE; do echo > "$FILE"; done
ls -al sources
Expand Down

0 comments on commit 329d762

Please sign in to comment.