mirror of
https://github.com/Loyalsoldier/surge-rules.git
synced 2026-03-17 20:24:55 +08:00
Workflow: purge CDN after a new release
This commit is contained in:
parent
11a9629129
commit
2884e764f0
12
.github/workflows/run.yml
vendored
12
.github/workflows/run.yml
vendored
@ -127,7 +127,7 @@ jobs:
|
||||
|
||||
- name: Git push assets to "release" branch
|
||||
run: |
|
||||
cd publish
|
||||
cd publish || exit 1
|
||||
git init
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
@ -136,3 +136,13 @@ jobs:
|
||||
git commit -m "${{ env.RELEASE_NAME }}"
|
||||
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
|
||||
git push -f -u origin release
|
||||
|
||||
- name: Purge jsdelivr CDN
|
||||
run: |
|
||||
cd publish || exit 1
|
||||
for file in $(ls); do
|
||||
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
|
||||
done
|
||||
for file in $(ls ruleset); do
|
||||
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/ruleset/${file}"
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user