Skip to content

Commit 6dc3cee

Browse files
committed
build: update cos config file
1 parent 3fb0fda commit 6dc3cee

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/deploy-tcloud.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,21 @@ jobs:
3737
3838
# 4. 配置 coscli 密钥和存储桶 (此步骤不变)
3939
- name: Configure coscli
40-
# ... 配置内容 ...
40+
run: |
41+
# coscli 需要一个配置文件 (~/.cos.yaml)
42+
# 注意:这里的 SecretId, SecretKey 等都是通过 GitHub Secrets 传入的环境变量
43+
mkdir -p ~/.config/coscli
44+
cat <<EOF > ~/.config/coscli/config.yaml
45+
# coscli 配置文件内容
46+
secretid: ${{ secrets.TENCENT_SECRET_ID }}
47+
secretkey: ${{ secrets.TENCENT_SECRET_KEY }}
48+
storageclass: STANDARD
49+
buckets:
50+
- name: ${{ secrets.COS_BUCKET }}
51+
region: ${{ secrets.COS_REGION }}
52+
EOF
53+
54+
4155
4256
# 5. 执行同步部署命令 (关键变化:需要指定 coscli 的路径)
4357
- name: Deploy Sync to COS

0 commit comments

Comments
 (0)