I realized that the context variable github.base_ref only works with 'pull requests' and they won't work correctly after the pull request is merged or a commit is pushed on a branch.
So I added an if statement to check for the type of event and set the variable correctly.
I realized that the context variable
github.base_ref
only works with 'pull requests' and they won't work correctly after the pull request is merged or a commit is pushed on a branch.So I added an if statement to check for the type of event and set the variable correctly.