Skip to content

Commit

Permalink
feat: update cdn.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
prnake authored Jan 21, 2024
1 parent 09cc988 commit d927d6f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/cdn.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Purge CDN Cache
on: [push]
on: [push, workflow_dispatch]
jobs:
build-linux:
runs-on: ubuntu-latest
Expand All @@ -11,12 +11,19 @@ jobs:
python-version: '3.10'
- name: Install tencentcloud-sdk-python
run: |
pip install tencentcloud-sdk-python
pip install tencentcloud-sdk-python coscmd
- name: Configure coscmd
env:
secret_id: ${{ secrets.SecretId }}
secret_key: ${{ secrets.SecretKey }}
bucket: ${{ secrets.BUCKET }}
region: ${{ secrets.REGION }}
run: coscmd config -a $secret_id -s $secret_key -b $bucket -r $region
- name: Upload to Tencent COS
run: coscmd upload -rs --delete . /
- name: Purge CDN Cache
env:
SecretId: ${{ secrets.SecretId }}
SecretKey: ${{ secrets.SecretKey }}
run: |
python .github/cdn.py

0 comments on commit d927d6f

Please sign in to comment.