mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-04 02:58:10 +10:00
Purge cache on upload
This commit is contained in:
@@ -56,6 +56,14 @@ jobs:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Bust Cloudflare cache
|
||||
run: |
|
||||
curl --silent --show-error --fail -X POST \
|
||||
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE_ID }}/purge_cache" \
|
||||
-H "Authorization: Bearer ${{ secrets.CF_BUST_CACHE_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data '{"files": ["https:\/\/data-v2.hacs.xyz\/removed\/data.json", "https:\/\/data-v2.hacs.xyz\/removed\/repositories.json"]}'
|
||||
|
||||
- name: Discord notification
|
||||
if: ${{ github.event_name == 'schedule' && failure() }}
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user