mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-14 22:29:17 +08:00
22 lines
453 B
YAML
22 lines
453 B
YAML
name: Purge image cache
|
|
|
|
on:
|
|
push:
|
|
schedule:
|
|
- cron: '54 18 * * *'
|
|
|
|
jobs:
|
|
purge:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- run: |
|
|
IMAGE_LIST=$(curl -sL https://github.com/${GITHUB_REPOSITORY} | \
|
|
grep -oE '<img src="https?://camo.githubusercontent.com/[^"]+' | \
|
|
sed -e 's/<img src="//')
|
|
echo ${IMAGE_LIST} | xargs -I % curl -sX PURGE %
|