Skip to content

Commit

Permalink
feat: setup-s v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
huyikun.hyk committed Feb 26, 2024
1 parent 032c117 commit 5245ee0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,41 @@ jobs:
node-version: 14.14.0

# Runs my action
- name: Setup serverless-devs
- name: Setup serverless-devs for aliyun
id: setup-s-aliyun
uses: ./
with:
provider: aliyun
account_id: MOCK_ACCOUNT_ID
access_key_id: MOCK_KEY_ID
access_key_secret: MOCK_KEY_SECRET
access: MOCK_ACCESS_ALIAS

- name: Setup serverless-devs
access: MOCK_ACCESS_ALIAS_ALIYUN

- name: Setup serverless-devs for aws
id: setup-s-aws
uses: ./
with:
provider: tencent
access_key_id: MOCK_KEY_ID
secret_access_key: MOCK_Secret_Access_Key
access: MOCK_ACCESS_ALIAS_AWS

- name: Setup serverless-devs for tencent
id: setup-s-tencent
uses: ./
with:
provider: tencent
account_id: MOCK_ACCOUNT_ID
secret_id: MOCK_SECRET_ID
secret_key: MOCK_SECRET_KEY
access: MOCK_ACCESS_ALIAS_TENCENT

- name: Setup serverless-devs for huawei
id: setup-s-huawei
uses: ./
with:
provider: huawei
access_key_id: MOCK_KEY_ID
access_key_secret: MOCK_KEY_SECRET
access: MOCK_ACCESS_ALIAS
secret_access_key: MOCK_Secret_Access_Key
access: MOCK_ACCESS_ALIAS_HUAWEI

4 changes: 2 additions & 2 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ if [[ $1 == "aliyun" ]]; then
s config add --AccountID $3 --AccessKeyID $4 --AccessKeySecret $5 -a $6 -f
elif [[ $1 == "aws" ]]; then
s config add --AccessKeyID $3 --SecretAccessKey $4 -a $5 -f
elif [[ $1 == "huawei" ]]; then
s config add --AccessKeyID $3 --SecretAccessKey $4 -a $5 -f
elif [[ $1 == "tencent" ]]; then
s config add --AccountID $3 --SecretID $4 --SecretKey $5 -a $6 -f
elif [[ $1 == "huawei" ]]; then
s config add --AccessKeyID $3 --SecretAccessKey $4 -a $5 -f
fi
echo '################################################'
echo 'The access has been configured automatically, use "s config get" to check.'
Expand Down

0 comments on commit 5245ee0

Please sign in to comment.