actions-gh-pages/.github/workflows/purge-readme-image-cache.yml
Shohei Ueda 4dfc201b55
ci: add workflow_dispatch event
> You can now create workflows that are manually triggered with the new workflow_dispatch event.
> You will then see a 'Run workflow' button on the Actions tab, enabling you to easily trigger a run.
> You can choose which branch the workflow is run on.

https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
2020-07-07 16:06:26 +09:00

18 lines
359 B
YAML

name: Purge image cache
on:
schedule:
- cron: '54 18 * * */7'
workflow_dispatch:
jobs:
purge:
runs-on: ubuntu-18.04
steps:
- 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 %