-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
45 lines (44 loc) · 1.1 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: 'QCloud Cos Deploy'
description: 'deploy project to cos'
inputs:
secret_id:
description: "qcloud secret ID"
required: false
default: ""
secret_key:
description: "qcloud secret key"
required: false
default: ""
token:
description: "qcloud ots token"
required: false
default: ""
buckets:
description: "存储桶名称"
required: true
region:
description: "存储桶地域"
required: true
runs:
using: "composite"
steps:
- run: |
wget https://github.com/tencentyun/coscli/releases/download/v0.12.0-beta/coscli-linux -O coscli
chmod 755 coscli
sudo mv ./coscli /usr/local/bin/
coscli --version
shell: bash
- run: |
echo "
cos:
base:
secretid: ${{ inputs.secret_id }}
secretkey: ${{ inputs.secret_key }}
sessiontoken: ${{ inputs.token }}
protocol: https
buckets:
- name: ${{ inputs.buckets }}
alias: ${{ inputs.buckets }}
region: ${{ inputs.region }}
" > ~/.cos.yaml
shell: bash