clippy-check
clippy-check copied to clipboard
result annotation sometimes gets added to the wrong workflow
Example in https://github.com/warner/magic-wormhole.rs/actions/runs/35621960
I've got two workflows: audit (which is triggered both by pushes and on a nightly schedule), and push (which is only triggered by a push). The clippy-check step lives in a job on the push workflow, but when I push a change and both workflows run, the clippy results show up as a job in the audit workflow. Sometimes, but not always. I haven't been able to track down what makes it appear in one place or the other.
My workaround was to name the results explicitly (with the name parameter), so at least it doesn't look like the job is being duplicated.
Was the intention that the result annotation got appended to the same job that ran the clippy step? I don't know how Actions' annotation API works, maybe there's an extra workflow-number field that needs to be passed in, and if it defaults to 0, then when multiple workflows are triggered by the same commit, something shows up in the wrong place.
thanks, -Brian
Hey!
It happens because currently this action creates a separate check run and it just sticks either to some random workflow in the GitHub UI, as they all are invoked for the same commit.
It is indeed very irritating, but so far I have no idea how to fix that :(
Extra links:
https://github.com/actions/toolkit/issues/74 https://github.com/andrewmcodes/rubocop-linter-action/issues/19
@svartalf If the markdown summary were written to the file at $GITHUB_STEP_SUMMARY instead of inserted as a check run, it would be attached to the correct workflow, job, and step. See: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/