ci(workflows): fix auto deploy error (#1166)

This commit is contained in:
lyf-coder 2022-11-30 16:49:12 +08:00 committed by GitHub
parent 51c4ba0a04
commit ec94565259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@ name: Auto Deploy Pr
# https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#workflow_run # https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#workflow_run
env: env:
nocobase_deploy_sh: /home/ecs-user/nocobase/auto-deploy-pr/nocobase-deploy.sh nocobase_deploy_sh_dir: /home/ecs-user/nocobase/auto-deploy-pr/
on: on:
workflow_run: workflow_run:
workflows: [ "Aliyun Container Registry" ] workflows: [ "Aliyun Container Registry" ]
@ -53,4 +53,5 @@ jobs:
username: ${{ secrets.deploy_host_username }} username: ${{ secrets.deploy_host_username }}
password: ${{ secrets.deploy_host_password }} password: ${{ secrets.deploy_host_password }}
script: | script: |
${{ env.nocobase_deploy_sh }} up ${{ env.pr_number }} cd ${{ env.nocobase_deploy_sh_dir }}
./nocobase-deploy.sh up ${{ env.pr_number }}

View File

@ -5,7 +5,7 @@ name: Auto down deploy
# https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#workflow_run # https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#workflow_run
env: env:
nocobase_deploy_sh: /home/ecs-user/nocobase/auto-deploy-pr/nocobase-deploy.sh nocobase_deploy_sh_dir: /home/ecs-user/nocobase/auto-deploy-pr/
on: on:
pull_request: pull_request:
types: types:
@ -29,4 +29,5 @@ jobs:
username: ${{ secrets.deploy_host_username }} username: ${{ secrets.deploy_host_username }}
password: ${{ secrets.deploy_host_password }} password: ${{ secrets.deploy_host_password }}
script: | script: |
${{ env.nocobase_deploy_sh }} down ${{ env.pr_number }} cd ${{ env.nocobase_deploy_sh_dir }}
./nocobase-deploy.sh down ${{ env.pr_number }}

View File

@ -2,7 +2,8 @@ name: manual_down_deploy_pr
# deploy_host # deploy_host
# deploy_host_username # deploy_host_username
# deploy_host_password # deploy_host_password
env:
nocobase_deploy_sh_dir: /home/ecs-user/nocobase/auto-deploy-pr/
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
@ -108,4 +109,5 @@ jobs:
username: ${{ secrets.deploy_host_username }} username: ${{ secrets.deploy_host_username }}
password: ${{ secrets.deploy_host_password }} password: ${{ secrets.deploy_host_password }}
script: | script: |
${{ env.nocobase_deploy_sh }} up ${{ env.pr_number }} cd ${{ env.nocobase_deploy_sh_dir }}
./nocobase-deploy.sh up ${{ env.pr_number }}