mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 17:11:34 +02:00
Merge pull request #846 from flatcar/t-lo/fix-pr-test-results-comment
workflows/pr-comment,run-kola: fix concurrency + results comment
This commit is contained in:
commit
0a8f4a54a9
@ -7,7 +7,7 @@ permissions:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
concurrency:
|
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
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -49,10 +49,16 @@ jobs:
|
|||||||
|
|
||||||
$res
|
$res
|
||||||
|
|
||||||
|
- name: Post a link to the workflow run to the PR
|
||||||
|
uses: mshick/add-pr-comment@v2
|
||||||
|
with:
|
||||||
|
issue: ${{ github.event.issue.pull_request.number }}
|
||||||
|
message: "Build action triggered: [${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
|
||||||
|
|
||||||
update_sdk:
|
update_sdk:
|
||||||
needs: check_maintainer_membership
|
needs: check_maintainer_membership
|
||||||
if: ( always() && needs.check_maintainer_membership.result == 'success'
|
if: ( needs.check_maintainer_membership.result == 'success'
|
||||||
&& contains(github.event.comment.body, '/update-sdk') )
|
&& contains(github.event.comment.body, '/update-sdk') )
|
||||||
name: "Build an updated SDK container"
|
name: "Build an updated SDK container"
|
||||||
# SDK build needs access to bincache ssh secret
|
# SDK build needs access to bincache ssh secret
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@ -60,8 +66,8 @@ jobs:
|
|||||||
|
|
||||||
build_image:
|
build_image:
|
||||||
needs: [ check_maintainer_membership, update_sdk ]
|
needs: [ check_maintainer_membership, update_sdk ]
|
||||||
if: ( always() && needs.check_maintainer_membership.result == 'success'
|
if: ( needs.check_maintainer_membership.result == 'success'
|
||||||
&& ( contains(github.event.comment.body, '/build-image') || needs.update_sdk.result == 'success' ) )
|
&& ( contains(github.event.comment.body, '/build-image') || needs.update_sdk.result == 'success' ) )
|
||||||
name: "Build the OS image"
|
name: "Build the OS image"
|
||||||
uses: ./.github/workflows/ci.yaml
|
uses: ./.github/workflows/ci.yaml
|
||||||
with:
|
with:
|
||||||
|
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"
|
cat test-results.md >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|
||||||
- name: If started from a PR, post test summary to PR
|
- name: If started from a PR event or a PR comment command, post test summary to PR
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' || github.event.issue.pull_request }}
|
||||||
uses: mshick/add-pr-comment@v2
|
uses: mshick/add-pr-comment@v2
|
||||||
with:
|
with:
|
||||||
|
issue: ${{ github.event.pull_request.number || github.event.issue.pull_request.number }}
|
||||||
message-path: "scripts/test-results.md"
|
message-path: "scripts/test-results.md"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user