From 0d187ffaf79e594aac34d6e9bdb4aebb72f37b73 Mon Sep 17 00:00:00 2001 From: iouAkira Date: Tue, 19 Jan 2021 11:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=91=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=9C=B0=E5=8C=BA=E9=85=8D=E7=BD=AE=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_tencent_scf.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy_tencent_scf.yml b/.github/workflows/deploy_tencent_scf.yml index 0c17e7d9..883e53fa 100644 --- a/.github/workflows/deploy_tencent_scf.yml +++ b/.github/workflows/deploy_tencent_scf.yml @@ -25,6 +25,7 @@ jobs: - name: "将Secrets里面配置的变量添加到severless.yml里面作为环境变量" run: | + if [ $SCF_REGION ]; then sed -i "s/region:.*$/region: $SCF_REGION/g" serverless.yml; fi; if [ $JD_COOKIE ]; then sed -i "/variables/a\ JD_COOKIE: $JD_COOKIE" serverless.yml; fi; if [ $JD_DEBUG ]; then sed -i "/variables/a\ JD_DEBUG: $JD_DEBUG" serverless.yml; fi; if [ $JD_USER_AGENT ]; then sed -i "/variables/a\ JD_USER_AGENT: $JD_USER_AGENT" serverless.yml; fi; @@ -85,6 +86,7 @@ jobs: cat serverless.yml env env: #因为直接读取secrets里面的值很多字符不会自动转译,导致写入serverless.yml异常,所以设置到环境变量,在读取环境变量转译过的值 + SCF_REGION: ${{ secrets.SCF_REGION }} JD_COOKIE: ${{ secrets.JD_COOKIE}} JD_DEBUG: ${{ secrets.JD_DEBUG}} JD_USER_AGENT: ${{ secrets.JD_USER_AGENT}}