mirror of
https://github.com/Lifailon/lazyjournal.git
synced 2026-11-11 01:09:46 +01:00
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:
@@ -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: {}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user