Skip to content

Update cache

Update cache #7

Workflow file for this run

name: Update cache
on:
schedule:
# at 11:31 UTC (19:31 CST/UTC +8) on every Friday
# https://crontab.guru/#31_11_*_*_5
- cron: "31 11 * * 5"
workflow_dispatch:
jobs:
update-cache:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v4
# https://cli.github.com/manual/gh_cache_list
# https://cli.github.com/manual/gh_cache_delete
- name: Delete setup-texlive-action caches
run: |
set -x
cache_keys=$(\
gh cache list --key setup-texlive --json key --jq '.[].key')
if [[ $(wc -l <<< "$cache_keys") -gt 1 ]]; then
echo "Multiple setup-texlive-action caches found"
for key in $cache_keys; do
echo "$key"
done
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create new cache
uses: teatimeguest/setup-texlive-action@v3
if: false
with:
package-file: .github/tl_packages
update-all-packages: true