Skip to content

Commit 0d340cc

Browse files
committed
feat: update github workflows
EE-18909
1 parent 0a0e4d0 commit 0d340cc

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.github/workflows/auto_merge_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
3333

3434
notify-feishu-on-failure:
35-
name: Notify Feishu on Failure
3635
runs-on: ubuntu-latest
36+
needs: auto-merge
3737
if: failure()
3838
steps:
3939
- name: Send notification to Feishu on failure
@@ -43,6 +43,6 @@ jobs:
4343
-d '{
4444
"msg_type": "text",
4545
"content": {
46-
"text": "⚠️ GitHub Action 失败通知:自动合并 PR 时失败,请检查!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- [查看日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
46+
"text": "⚠️ GitHub Action 失败通知:自动合并 PR 时失败,请检查!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- 查看日志: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
4747
}
4848
}'

.github/workflows/auto_update_release_notes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ jobs:
174174
auto_merge
175175
176176
notify-feishu-on-failure:
177-
name: Notify Feishu on Failure
178177
runs-on: ubuntu-latest
178+
needs: update-release-notes
179179
if: failure()
180180
steps:
181181
- name: Send notification to Feishu on failure
@@ -185,6 +185,6 @@ jobs:
185185
-d '{
186186
"msg_type": "text",
187187
"content": {
188-
"text": "🚨 GitHub Action 失败通知:从飞书更新 Release Notes 并发起 PR 时失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- [查看日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
188+
"text": "🚨 GitHub Action 失败通知:从飞书更新 Release Notes 并发起 PR 时失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- 查看日志: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
189189
}
190190
}'

.github/workflows/dispatch.prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: prod dispath
1+
name: Dispath to production
22

33
on:
44
schedule:
@@ -30,8 +30,8 @@ jobs:
3030
client-payload: '{ "repo": "${{ github.repository }}", "ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}", "env": "prod" }'
3131

3232
notify-feishu-on-failure:
33-
name: Notify Feishu on Failure
3433
runs-on: ubuntu-latest
34+
needs: trigger
3535
if: failure()
3636
steps:
3737
- name: Send notification to Feishu on failure
@@ -41,6 +41,6 @@ jobs:
4141
-d '{
4242
"msg_type": "text",
4343
"content": {
44-
"text": "🚨 GitHub Action 失败通知:官网文档分发失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- [查看日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
44+
"text": "🚨 GitHub Action 失败通知:官网文档分发失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- 查看日志: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
4545
}
4646
}'

.github/workflows/dispatch.staging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: staging dispath
1+
name: Dispath to staging
22

33
on:
44
push:
@@ -25,8 +25,8 @@ jobs:
2525
client-payload: '{ "repo": "${{ github.repository }}", "ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}", "env": "staging" }'
2626

2727
notify-feishu-on-failure:
28-
name: Notify Feishu on Failure
2928
runs-on: ubuntu-latest
29+
needs: trigger
3030
if: failure()
3131
steps:
3232
- name: Send notification to Feishu on failure
@@ -36,6 +36,6 @@ jobs:
3636
-d '{
3737
"msg_type": "text",
3838
"content": {
39-
"text": "⚠️ GitHub Action 失败通知:官网文档分发预演失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- [查看日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
39+
"text": "⚠️ GitHub Action 失败通知:官网文档分发预演失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- 查看日志: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
4040
}
4141
}'

.github/workflows/generate_pdf_and_upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ jobs:
9595
run: rm -f ~/.ssh/id_rsa
9696

9797
notify-feishu-on-failure:
98-
name: Notify Feishu on Failure
9998
runs-on: ubuntu-latest
99+
needs: generate-pdf-and-upload
100100
if: failure()
101101
steps:
102102
- name: Send notification to Feishu on failure
@@ -106,6 +106,6 @@ jobs:
106106
-d '{
107107
"msg_type": "text",
108108
"content": {
109-
"text": "🚨 GitHub Action 失败通知:生成 PDF 文档并上传时失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- [查看日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
109+
"text": "🚨 GitHub Action 失败通知:生成 PDF 文档并上传时失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 详情: ${{ github.event.head_commit.message }}\n- 查看日志: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
110110
}
111111
}'

0 commit comments

Comments
 (0)