From 906260b3480b0bd69eea08634d7b0758ed59d3c9 Mon Sep 17 00:00:00 2001 From: DoveBoy <393366046@qq.com> Date: Sat, 30 Jan 2021 12:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=89=A7=E8=A1=8Cindex.js=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E7=9A=84secret?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_tencent_scf.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_tencent_scf.yml b/.github/workflows/deploy_tencent_scf.yml index f08df3a4..d84b8d3f 100644 --- a/.github/workflows/deploy_tencent_scf.yml +++ b/.github/workflows/deploy_tencent_scf.yml @@ -26,10 +26,11 @@ 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; + if [ $TENCENTSCF_SOURCE_TYPE ]; then sed -i "/variables/a\ TENCENTSCF_SOURCE_TYPE: $TENCENTSCF_SOURCE_TYPE" serverless.yml; fi; + if [ $TENCENTSCF_SOURCE_URL ]; then sed -i "/variables/a\ TENCENTSCF_SOURCE_URL: $TENCENTSCF_SOURCE_URL" serverless.yml; fi; if [ $PUSH_KEY ]; then sed -i "/variables/a\ PUSH_KEY: $PUSH_KEY" serverless.yml; fi; if [ $BARK_PUSH ]; then sed -i "/variables/a\ BARK_PUSH: $BARK_PUSH" serverless.yml; fi; if [ $BARK_SOUND ]; then sed -i "/variables/a\ BARK_SOUND: $BARK_SOUND" serverless.yml; fi; @@ -94,10 +95,11 @@ 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}} + TENCENTSCF_SOURCE_TYPE: ${{ secrets.TENCENTSCF_SOURCE_TYPE}} + TENCENTSCF_SOURCE_URL: ${{ secrets.TENCENTSCF_SOURCE_URL}} PUSH_KEY: ${{ secrets.PUSH_KEY}} BARK_PUSH: ${{ secrets.BARK_PUSH}} BARK_SOUND: ${{ secrets.BARK_SOUND}}