I’m using Github Actions with my project for CI and automation, and I was particularly excited to use the newly-announced
workflow-dispatch event for manual actions. However, I’ve encountered a pretty major bug in my time using it: any runs triggered by it seem to check out a tree that’s one commit older than the branch’s latest commit, even though the run says it’s using the latest commit.
See here for an example of the problem.
In this case, I’d submitted a patch to fix a bug we’d uncovered in an Actions run. However, after my colleague initiated a manual run with
workflow_dispatch, we ran into the exact same error as before – even down to the line number: the Actions log says the Python script failed on line 59, but as is visible in the diff for the commit that the manual run should be running on (commit
c0ffa83), line 59 was changed to something completely different, and line 60 is what should have prompted the error, if there was one.
What’s even stranger is that the exact same code and the exact same commit ran perfectly once it hit a scheduled re-run. The only conclusion I can draw is that Actions’
workflow_dispatch trigger is somehow bugged.