mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 16:37:01 +02:00
workflows/pr-comment,run-kola: fix concurrency + results comment
This change includes 2 unrelated small fixes to the "PR comment command" build+test feature: 1. The concurrency group now contains the PR number, ensuring that builds for multiple PRs can run in parallel. This addresses an issue in which starting a build on a PR would cancel a running build of another PR. 2. Post test results to the PR where the build command was issued on. The add-pr-comment step's condition was not updated when switching to PR comment commands for starting builds, so the step would only run if the action was triggered by a PR change event. Since we now trigger on issue_comment, the step never ran. Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This commit is contained in:
parent
d69e400f0b
commit
a14a89f2b8
@ -7,7 +7,7 @@ permissions:
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-pr-command-${{ github.head_ref || github.ref_name }}
|
||||
group: ${{ github.workflow }}-pr-command-${{ github.event.issue.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
5
.github/workflows/run-kola-tests.yaml
vendored
5
.github/workflows/run-kola-tests.yaml
vendored
@ -351,8 +351,9 @@ jobs:
|
||||
|
||||
cat test-results.md >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: If started from a PR, post test summary to PR
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
- name: If started from a PR event or a PR comment command, post test summary to PR
|
||||
if: ${{ github.event_name == 'pull_request' || github.event.issue.pull_request }}
|
||||
uses: mshick/add-pr-comment@v2
|
||||
with:
|
||||
issue: ${{ github.event.pull_request.number || github.event.issue.pull_request.number }}
|
||||
message-path: "scripts/test-results.md"
|
||||
|
Loading…
Reference in New Issue
Block a user