Update META.js #3
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: Check and Purge CDN Cache | |
on: | |
push: | |
branches: | |
- script | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Run script | |
run: node META.js | |
purge-dns-cache: | |
runs-on: ubuntu-latest | |
needs: check | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Purge CDN cache | |
run: | | |
for file in $(ls); do | |
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@script/${file}" | |
done |