-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat-generals_release
- Loading branch information
Showing
22 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
name: Purge CDN Cache | ||
on: [push] | ||
on: [push, workflow_dispatch] | ||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
lfs: 'true' | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
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: | | ||
rm -r .git | ||
coscmd upload -rs --delete --yes . / | ||
- name: Purge CDN Cache | ||
env: | ||
SecretId: ${{ secrets.SecretId }} | ||
SecretKey: ${{ secrets.SecretKey }} | ||
run: | | ||
python .github/cdn.py | ||
Oops, something went wrong.