mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
Merge pull request #4015 from tertsdiepraam/ci-post-gnu-comment
CI: run GnuComment also if pipeline fails
This commit is contained in:
commit
e578502e99
2 changed files with 14 additions and 16 deletions
13
.github/workflows/GnuComment.yml
vendored
13
.github/workflows/GnuComment.yml
vendored
|
@ -1,7 +1,5 @@
|
|||
name: Comment on GNU test results on the PR
|
||||
name: GnuComment
|
||||
|
||||
# read-write repo token
|
||||
# access to secrets
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["GnuTests"]
|
||||
|
@ -9,24 +7,23 @@ on:
|
|||
- completed
|
||||
|
||||
jobs:
|
||||
upload:
|
||||
post-comment:
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event.workflow_run.event == 'pull_request' &&
|
||||
github.event.workflow_run.conclusion == 'success'
|
||||
github.event.workflow_run.event == 'pull_request'
|
||||
steps:
|
||||
- name: 'Download artifact'
|
||||
uses: actions/github-script@v3.1.0
|
||||
with:
|
||||
script: |
|
||||
# List all artifacts from GnuTests
|
||||
// List all artifacts from GnuTests
|
||||
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{ github.event.workflow_run.id }},
|
||||
});
|
||||
|
||||
# Download the "comment" artifact, which contains a PR number (NR) and result.txt
|
||||
// Download the "comment" artifact, which contains a PR number (NR) and result.txt
|
||||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||
return artifact.name == "comment"
|
||||
})[0];
|
||||
|
|
1
.github/workflows/GnuTests.yml
vendored
1
.github/workflows/GnuTests.yml
vendored
|
@ -244,6 +244,7 @@ jobs:
|
|||
fi
|
||||
if test -n "${have_new_failures}" ; then exit -1 ; fi
|
||||
- name: Upload comparison log (for GnuComment workflow)
|
||||
if: success() || failure() # run regardless of prior step success/failure
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: comment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue