Purge cache on upload

This commit is contained in:
ludeeus
2023-01-14 08:49:16 +00:00
parent 23733bb692
commit 043b07d42b
+8
View File
@@ -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: |