File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed
Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change 77 paths :
88 - media/**
99jobs :
10- run :
10+ upload :
1111 name : Upload media files
1212 runs-on : ubuntu-latest
1313 steps :
3535 - name : Upload
3636 run : |
3737 cloud-assets-utils verify-and-sync -qiniu true -qiniu-bucket ${{ secrets.QINIU_BUCKET_NAME }} media -replace-first-path-to images/tidb-in-kubernetes -cdn-refresh https://download.pingcap.com/
38+
39+ - name : Install coscli
40+ run : |
41+ wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-amd64
42+ mv coscli-linux-amd64 coscli
43+ chmod 755 coscli
44+ - name : Upload to COS
45+ run : |
46+ ./coscli sync media/ cos://${{ secrets.TENCENTCLOUD_BUCKET_ID }}/media/images/tidb-in-kubernetes \
47+ --init-skip \
48+ --recursive \
49+ --routines 16 \
50+ --secret-id ${{ secrets.TENCENTCLOUD_SECRET_ID }} \
51+ --secret-key ${{ secrets.TENCENTCLOUD_SECRET_KEY }} \
52+ --endpoint cos.ap-beijing.myqcloud.com
53+
54+ cdn-refresh :
55+ needs : upload
56+ runs-on : ubuntu-latest
57+ name : Refresh CDN Cache
58+ env :
59+ TENCENTCLOUD_SECRET_ID : ${{ secrets.TENCENTCLOUD_SECRET_ID }}
60+ TENCENTCLOUD_SECRET_KEY : ${{ secrets.TENCENTCLOUD_SECRET_KEY }}
61+ steps :
62+ - name : Checkout repository
63+ uses : actions/checkout@v4
64+
65+ - name : Set up Python environment
66+ uses : actions/setup-python@v5
67+ with :
68+ python-version : ' 3.12'
69+ architecture : ' x64'
70+
71+ - name : Install Tencent Cloud CLI
72+ run : pipx install tccli
73+
74+ - name : Purge production CDN cache
75+ run : tccli cdn PurgePathCache --Paths '["https://docs-download.pingcap.com/media/images/tidb-in-kubernetes/"]' --FlushType delete
You can’t perform that action at this time.
0 commit comments