We have a few workflows running in our repos, but have seen different behaviour around what’s passed in for github.ref depending on how we trigger our workflow. Normally, this workflow is triggered based on pushes:
name: Feature Tests on: push: branches: - "feature/**"
When triggered from a push, the github.ref has the full branch name, e.g.,refs/heads/feature/my-new-feature/fancy-display. However, if this workflow fails and then we re-run it using Re-run all jobs, then github.ref comes in as _refs/heads/__feature/my-new-feature/fancy-d, _always truncating the branch name down to 30 characters (40 characters with refs/heads/). We’ve tried this with multiple branches whose names are over 30 characters on the same workflow, and gotten the same results with those as well.
Is it expected that github.ref changes depending on how the workflow is triggered for the cases above? If so, is there any alternative context we can use to get the branch name consistently?