Skip to content

Commit cb8486e

Browse files
committed
ci(workflow): 添加workflow_dispatch触发器和更新权限配置
更新GitHub Actions工作流文件,添加workflow_dispatch触发器以支持手动运行工作流 同时添加必要的权限配置,并修改测试报告发布条件为always() || failure()
1 parent 38d712a commit cb8486e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
branches: [ master ]
66
pull_request:
77
branches: [ master ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
checks: write
13+
pull-requests: write # 如果需要评论 PR
814

915
jobs:
1016
test:
@@ -25,7 +31,7 @@ jobs:
2531
# 测试图形化报告
2632
- name: Publish Test Report
2733
uses: dorny/test-reporter@v2
28-
if: always()
34+
if: always() || failure()
2935
with:
3036
name: Pester Tests (${{ matrix.os }})
3137
path: testResults.xml

0 commit comments

Comments
 (0)