更多的云函数自定义变量
This commit is contained in:
2
.github/workflows/deploy_tencent_scf.yml
vendored
2
.github/workflows/deploy_tencent_scf.yml
vendored
@ -166,3 +166,5 @@ jobs:
|
||||
SERVERLESS_PLATFORM_VENDOR: tencent
|
||||
TENCENT_SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }}
|
||||
TENCENT_SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }}
|
||||
TENCENT_REGION: ${{ secrets.TENCENT_REGION }}
|
||||
TENCENT_FUNCTION_NAME: ${{ secrets.TENCENT_FUNCTION_NAME }}
|
||||
|
@ -11,7 +11,7 @@ const clientConfig = {
|
||||
secretId: process.env.TENCENT_SECRET_ID,
|
||||
secretKey: process.env.TENCENT_SECRET_KEY,
|
||||
},
|
||||
region: "ap-hongkong",
|
||||
region: process.env.TENCENT_REGION, // 区域参考,https://cloud.tencent.com/document/product/213/6091
|
||||
profile: {
|
||||
httpProfile: {
|
||||
endpoint: "scf.tencentcloudapi.com",
|
||||
@ -22,7 +22,7 @@ const clientConfig = {
|
||||
const client = new ScfClient(clientConfig);
|
||||
const params = {
|
||||
"Handler": "index.main_handler",
|
||||
"FunctionName": "jd",
|
||||
"FunctionName": process.env.TENCENT_FUNCTION_NAME, // 云函数程序名,例如 jd_scripts
|
||||
"ZipFile": contents_in_base64
|
||||
};
|
||||
client.UpdateFunctionCode(params).then(
|
||||
|
Reference in New Issue
Block a user