Branch name of workflows does not accurately display the branch name of the workflow file executed #122941
Unanswered
ChipShaddAtCube
asked this question in
Actions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Bug
Body
I noticed some weird behavior while troubleshooting something else. I will include what I was troubleshooting in addition to what I found.
My use case:
Core Workflow file
Expected behaviour
main
main
main
branch in the list of previous workflow runsActual behavior
main
main
branchpush
tomain
so in the list of workflow runs, users expect to see that all actions were run on main, but instead, they see that hooks were run onmain
, and code was seemingly deployed from the feature branch.The weird behavior
This got me thinking...what if the workflow in
main
was updated, and a feature branch was merged in with an outdated workflow file (not best practice, I know).In my
main
branch, I cut a feature branch, and then I changed the trigger to the following, directly in themain
branch:I then merged in the feature branch, without rebasing, into
main
. (feature branch's workflow file still set to trigger on PR closure).Expected behavior
Actual behavior
main
if: github.event.pull_request.merged == true
conditional inmain
It seems like GH uses the most recent version of the workflow file between the branches being merged? Although the UI (in multiple places) indicate otherwise.
Beta Was this translation helpful? Give feedback.
All reactions