fix the report follower trigger after the workflow rename

The `workflows:` filter of the workflow_run trigger matches on the workflow
`name:` only. The rename made the producer "[PR] Unit testing (job #1)" while
the follower still listened for "Unit testing", so the follower never ran again
(PR #92 got no report, comment, or check annotations). The follower now listens
for the new name, a comment above the trigger warns about the name-based
coupling, and the stale name in the producer's own comment is updated.
This commit is contained in:
Cayan
2026-11-10 12:04:16 -03:00
parent 4c2c1e7c4a
commit d6b125b25e
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -2,7 +2,10 @@ name: "[PR] Testing report (job #2)"
on:
workflow_run:
workflows: ["Unit testing"]
# GitHub matches this list on the workflow `name:` only. It must equal the
# name in pr-unit-test.yml; a rename there without a change here silently
# stops this follower from ever running.
workflows: ["[PR] Unit testing (job #1)"]
types: [completed]
permissions: {}
+4 -4
View File
@@ -91,10 +91,10 @@ jobs:
timeout-minutes: 10
run: sudo env "PATH=$PATH" gotestsum --format standard-verbose --junitfile report.xml -- ./... -v -cover
# The report is published by the "Unit testing report" workflow (workflow_run
# follower), which runs on the base repository's context. This job executes
# untrusted PR code, so it keeps a read-only token, no persisted credentials,
# and no secrets; the artifact is the only thing it hands over.
# The report is published by the "[PR] Testing report (job #2)" workflow
# (workflow_run follower), which runs on the base repository's context. This
# job executes untrusted PR code, so it keeps a read-only token, no persisted
# credentials, and no secrets; the artifact is the only thing it hands over.
- name: Upload junit report artifact
if: always()
uses: actions/upload-artifact@v7