From 22f1b9b541ec75e68a7bc9c2ebf805c6dcf06442 Mon Sep 17 00:00:00 2001 From: lyf-coder <58352715+lyf-coder@users.noreply.github.com> Date: Thu, 1 Dec 2022 14:26:46 +0800 Subject: [PATCH] fix: auto deploy error (#1168) * ci(workflows): fix auto deploy error * ci(workflows): separate send feishu bot msg * ci(workflows): send feishu message remove content text --- .../workflows/aliyun-container-registry.yml | 18 ------------ .../workflows/auto_send_feishu_bot_msg.yml | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/auto_send_feishu_bot_msg.yml diff --git a/.github/workflows/aliyun-container-registry.yml b/.github/workflows/aliyun-container-registry.yml index 4472e549f..c1c054516 100644 --- a/.github/workflows/aliyun-container-registry.yml +++ b/.github/workflows/aliyun-container-registry.yml @@ -82,21 +82,3 @@ jobs: with: name: image_tag path: image/ - - - name: text message - if: github.event_name == 'pull_request' - uses: foxundermoon/feishu-action@v2 - with: - url: ${{ secrets.PR_FEISHU_BOT_WEBHOOK_URL }} - msg_type: text - content: | - text: | - 地址:${{ github.event.pull_request.html_url }} - 标题:${{ github.event.pull_request.title }} - 内容:${{ github.event.pull_request.body }} - 分支:${{ github.event.pull_request.head.ref }} - 触发者:${{ github.triggering_actor }} - ---------------------------------------------- - 正在自动部署环境-稍后访问地址:http://${{ secrets.deploy_host }}:1${{ github.event.number }} - ----------------------------------------------- - 请及时更新任务系统的任务状态:https://tasks.nocobase.com/ diff --git a/.github/workflows/auto_send_feishu_bot_msg.yml b/.github/workflows/auto_send_feishu_bot_msg.yml new file mode 100644 index 000000000..c63dd4fc4 --- /dev/null +++ b/.github/workflows/auto_send_feishu_bot_msg.yml @@ -0,0 +1,28 @@ +name: Auto send feishu bot msg + +on: + workflow_run: + workflows: [ "Aliyun Container Registry" ] + types: + - "completed" + +jobs: + send_feishu_bot_msg: + runs-on: ubuntu-latest + steps: + - name: pr deploy text message + if: github.event_name == 'pull_request' + uses: foxundermoon/feishu-action@v2 + with: + url: ${{ secrets.PR_FEISHU_BOT_WEBHOOK_URL }} + msg_type: text + content: | + text: | + 地址:${{ github.event.pull_request.html_url }} + 标题:${{ github.event.pull_request.title }} + 分支:${{ github.event.pull_request.head.ref }} + 触发者:${{ github.triggering_actor }} + ---------------------------------------------- + 正在自动部署环境-稍后访问地址:http://${{ secrets.deploy_host }}:1${{ github.event.number }} + ----------------------------------------------- + 请及时更新任务系统的任务状态:https://tasks.nocobase.com/