This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
Cache Purge #140
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cache Purge | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- "Build Docker Image" | |
- "Build Jar" | |
- "Build Linux" | |
- "Build Windows" | |
- "Release Published" | |
types: | |
- completed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Purge User Cache | |
run: | | |
curl --location --request POST "${WEBDAV_ADDRESS%/*}/api/admin/user/del_cache?username=guest" \ | |
--header "Authorization: $ALIST_TOKEN" | |
env: | |
ALIST_TOKEN: ${{secrets.ALIST_TOKEN}} | |
WEBDAV_ADDRESS: ${{secrets.WEBDAV_ADDRESS_R}} | |
shell: bash | |
- name: Purge List Cache | |
run: | | |
curl --location "${WEBDAV_ADDRESS%/*}/api/fs/list" \ | |
--header "Authorization: $ALIST_TOKEN" \ | |
--header 'Content-Type: application/json' \ | |
--data '{ "path": "/download/aliyundriver", "password": "", "page": 1, "per_page": 0, "refresh": true}' | |
env: | |
ALIST_TOKEN: ${{secrets.ALIST_TOKEN}} | |
WEBDAV_ADDRESS: ${{secrets.WEBDAV_ADDRESS_R}} | |
shell: bash | |