gha: Add push trigger

This commit is contained in:
peaceiris 2019-12-08 17:45:29 +09:00
parent 900499cd1c
commit 3cf50c6d11

View file

@ -1,6 +1,7 @@
name: Purge image cache
on:
push:
schedule:
- cron: '4 18 * * *'
@ -9,8 +10,8 @@ jobs:
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 %
- run: >
curl -sL https://github.com/${GITHUB_REPOSITORY} |
grep -oE '<img src="https?://camo.githubusercontent.com/[^"]+' |
sed -e 's/<img src="//' |
xargs -I % curl -sX PURGE %