gha: Add push trigger

This commit is contained in:
peaceiris 2019-12-08 17:45:29 +09:00
parent 900499cd1c
commit 3cf50c6d11
1 changed files with 6 additions and 5 deletions

View File

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