gha: Add workflow to purge readme image cache
This commit is contained in:
parent
739a95f1e7
commit
da7c321b3b
1 changed files with 19 additions and 0 deletions
19
.github/workflows/purge-readme-image-cache.yml
vendored
Normal file
19
.github/workflows/purge-readme-image-cache.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Purge image cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
schedule:
|
||||||
|
- cron: '4 18 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
purge:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- 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 %
|
Loading…
Reference in a new issue