单主运行作业的多个跑步者在PR覆盖状态上具有相同ID
我有2名自托管跑步者 - “跑步者”& 1台机器上的“无跑者资源”。我有2个标签“运行UI测试”和“跳过UI测试”。根据标签开始的作业使用相同的作业ID,即“ PR_UI_TESTS_CHECK”,并且该作业在分支保护规则中按要求标记。
pr_check_skip_ui_tests.yaml
name: Skip UI tests on pull request`
on:
pull_request:
types: [ labeled, synchronize ]
jobs:
pr_ui_tests_check:
if: contains(github.event.pull_request.labels.*.name, 'Skip UI tests')
runs-on: runner-resource-free
timeout-minutes: 10
concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Skip tests
run: echo "Tests skipped"
pr_check_run_ui_tests.yaml
name: Run UI tests on pull request
on:
pull_request:
types: [ labeled, synchronize ]
jobs:
pr_ui_tests_check:
if: contains(github.event.pull_request.labels.*.name, ‘Run UI tests’)
runs-on: runner
timeout-minutes: 150
concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run UI tests
uses: ./.github/actions/run-ui-tests
当我使用标签“运行ui tests”上的pull request#1运行UI测试时,他们可以开始。但是,当我将标签“跳过UI Tests”添加到拉请求2中时,此作业完成了覆盖拉的请求#1并将“ PR_UI_TESTS_CHECK”标记为成功,因为在另一个拉的请求中跳过。我该怎么避免?
I have 2 self hosted runners - ‘runner’ & ‘runner-resource-free’ on 1 machine. I have 2 labels ‘Run UI tests’ and ‘Skip UI tests’. Jobs which start based on label use the same job id which is ‘pr_ui_tests_check’ and this job is marked as required in branch protection rules.
pr_check_skip_ui_tests.yaml
name: Skip UI tests on pull request`
on:
pull_request:
types: [ labeled, synchronize ]
jobs:
pr_ui_tests_check:
if: contains(github.event.pull_request.labels.*.name, 'Skip UI tests')
runs-on: runner-resource-free
timeout-minutes: 10
concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Skip tests
run: echo "Tests skipped"
pr_check_run_ui_tests.yaml
name: Run UI tests on pull request
on:
pull_request:
types: [ labeled, synchronize ]
jobs:
pr_ui_tests_check:
if: contains(github.event.pull_request.labels.*.name, ‘Run UI tests’)
runs-on: runner
timeout-minutes: 150
concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run UI tests
uses: ./.github/actions/run-ui-tests
When I run UI tests on pull request #1 using label 'Run UI tests' they start okay. But when I add label 'Skip UI tests' on pull request #2 and this job finishes it overwrites pull request #1 and marks 'pr_ui_tests_check' as success due to skip in another pull request. How can I avoid that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论