Skip to content

Commit 99ae886

Browse files
committed
chore: update Tencent CI workflow to use actions/checkout@v2.3.5, adjust coscmd installation command, and streamline configuration and upload steps
1 parent ac67402 commit 99ae886

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

.github/workflows/tencent.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout master
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v2.3.5
1515
with:
1616
ref: master
1717

@@ -23,24 +23,16 @@ jobs:
2323
- name: Build project
2424
run: npm i -g pnpm && pnpm install && pnpm build
2525

26-
- name: Build
27-
run: pnpm build
28-
29-
- name: Setup Python
30-
uses: actions/setup-python@v5
31-
with:
32-
python-version: "3.11"
33-
3426
- name: Install coscmd
35-
run: pip install coscmd
27+
run: sudo pip install coscmd
3628

3729
- name: Configure coscmd
38-
run: |
39-
coscmd config \
40-
-a ${{ secrets.SECRET_ID }} \
41-
-s ${{ secrets.SECRET_KEY }} \
42-
-b ${{ secrets.BUCKET }} \
43-
-r ap-shanghai
44-
45-
- name: Upload to COS
46-
run: coscmd upload -rfs --delete dist/ /
30+
env:
31+
SECRET_ID: ${{ secrets.SecretId }}
32+
SECRET_KEY: ${{ secrets.SecretKey }}
33+
BUCKET: docs-1300533487
34+
REGION: ap-shanghai
35+
run: coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
36+
37+
- name: Upload
38+
run: coscmd upload -rfs --delete dist/ / --ignore "./.git/*"

0 commit comments

Comments
 (0)