From 4df6fedee18cad2e99a8a4e813b2cd4b999ec8b8 Mon Sep 17 00:00:00 2001 From: Jinke Li Date: Tue, 30 Apr 2024 15:52:57 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E8=BF=87=E6=97=B6?= =?UTF-8?q?=E7=9A=84=20workflow=20(#2695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue-opend.yml | 10 ++++++ .github/workflows/release-success.yml | 31 ++-------------- .github/workflows/site-build-notify.yml | 40 --------------------- .github/workflows/sync-notify.yml | 48 ------------------------- 4 files changed, 13 insertions(+), 116 deletions(-) delete mode 100644 .github/workflows/site-build-notify.yml delete mode 100644 .github/workflows/sync-notify.yml diff --git a/.github/workflows/issue-opend.yml b/.github/workflows/issue-opend.yml index ec973f8af4..4225078b58 100644 --- a/.github/workflows/issue-opend.yml +++ b/.github/workflows/issue-opend.yml @@ -33,3 +33,13 @@ jobs: 你好 @${{ github.event.issue.user.login }},请按照 issue 模板填写相关信息, 方便大家高效沟通, 强烈推荐你阅读 [提 Issue 前必读](https://github.com/antvis/S2/issues/1904) 和 [如何向开源项目提交无法解答的问题](https://zhuanlan.zhihu.com/p/25795393)。 Hello @${{ github.event.issue.user.login }}, please fill in the relevant information according to the issue template to facilitate communication efficiently. recommend you to read [提 Issue 前必读](https://github.com/antvis/S2/issues/1904) and [如何向开源项目提交无法解答的问题](https://zhuanlan.zhihu.com/p/25795393), Thanks so much! + + # 标题或正文 (版本号) 带有 next, 增加标记便于统计 + - name: Auto Set Next Label + if: contains(github.event.issue.title, 'next') || contains(github.event.issue.body, 'next') + uses: actions-cool/issues-helper@main + with: + actions: 'add-labels' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'next' diff --git a/.github/workflows/release-success.yml b/.github/workflows/release-success.yml index 184261b477..f622612bdd 100644 --- a/.github/workflows/release-success.yml +++ b/.github/workflows/release-success.yml @@ -55,33 +55,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.JINKE_GITHUB_TOKEN }} - # 开始部署官网 - - name: 🔊 Deploy start notify - uses: zcong1993/actions-ding@master - with: - dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }} - ignoreError: true - body: | - { - "msgtype": "link", - "link": { - "title": "📢 开始自动部署旧版官网 (https://s2.antv.vision) 📢 ", - "text": "🔗 请点击链接查看详情", - "messageUrl": "https://github.com/antvis/S2/actions/workflows/release-success.yml", - "picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*gt5-RZDjt3IAAAAAAAAAAAAADmJ7AQ/original" - } - } - - # 安装官网依赖 - - name: Install Dependencies - run: yarn - - # 部署官网 - - name: Deploy Site - run: yarn deploy - # 失败通知 - - name: 🔊 Deploy failed notify + - name: 🔊 Create failed notify if: ${{ failure() }} uses: zcong1993/actions-ding@master with: @@ -91,8 +66,8 @@ jobs: { "msgtype": "link", "link": { - "title": "🚨 旧版官网部署失败", - "text": "🔗 请点击链接查看具体原因, 尝试点击右上角 [Re-run all jobs] 重试, 或者手动部署 🚑", + "title": "🚨 同步 CHANGELOG 失败", + "text": "🔗 请点击链接查看具体原因, 尝试点击右上角 [Re-run all jobs] 重试 🚑", "messageUrl": "https://github.com/antvis/S2/actions/workflows/release-success.yml", "picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*PRSkSqsE_vYAAAAAAAAAAAAADmJ7AQ/original" } diff --git a/.github/workflows/site-build-notify.yml b/.github/workflows/site-build-notify.yml deleted file mode 100644 index d34d32097c..0000000000 --- a/.github/workflows/site-build-notify.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: 🚀 Site Build Notify -on: - page_build - -jobs: - site-build-notify: - runs-on: ubuntu-latest - - steps: - - name: Old Site Build Success Notify - uses: zcong1993/actions-ding@master - with: - dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }} - ignoreError: true - body: | - { - "msgtype": "link", - "link": { - "title": "✅ 旧官网 (https://s2.antv.vision) 部署成功", - "text": "点击访问", - "messageUrl": "https://s2.antv.vision/", - "picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*1PTTQLk3j5AAAAAAAAAAAAAADmJ7AQ/original" - } - } - - - name: New Site Build Notify - uses: zcong1993/actions-ding@master - with: - dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }} - ignoreError: true - body: | - { - "msgtype": "link", - "link": { - "title": "📢 请发布值班手动部署新官网 (https://s2.antv.antgroup.com) 📢", - "text": "点击查看部署教程", - "messageUrl": "https://yuque.antfin-inc.com/spreadsheet/garqs6/hednl5#RfuD9", - "picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*RXmkQrNYxqoAAAAAAAAAAAAADmJ7AQ/original" - } - } diff --git a/.github/workflows/sync-notify.yml b/.github/workflows/sync-notify.yml deleted file mode 100644 index 227d218ae5..0000000000 --- a/.github/workflows/sync-notify.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: 📢 Sync Notify - -on: - workflow_run: - workflows: ["🔁 Sync Changelog With PR"] - types: - - completed - -jobs: - on-success: - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' - steps: - - name: Sync success after ding talk dev group notify - uses: zcong1993/actions-ding@master - with: - dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }} - ignoreError: true - body: | - { - "msgtype": "link", - "link": { - "title": "✅ 同步 changelog 成功", - "text": "📢 请发布值班合并该 PR 后, 访问官网查看是否有异常", - "messageUrl": "https://s2.antv.antgroup.com", - "picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*1PTTQLk3j5AAAAAAAAAAAAAADmJ7AQ/original" - } - } - - on-failure: - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'failure' - steps: - - name: Sync failed after ding talk dev group notify - uses: zcong1993/actions-ding@master - with: - dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }} - ignoreError: true - body: | - { - "msgtype": "link", - "link": { - "title": "🚨 🔁 同步 Changelog 失败", - "text": "🔗 请点击链接查看具体原因, 点击右上角 [Re-run all jobs] 手动同步 🚑", - "messageUrl": "https://github.com/antvis/S2/actions/workflows/sync-site-lock-changelog-with-pr.yml", - "picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*RXmkQrNYxqoAAAAAAAAAAAAADmJ7AQ/original" - } - }