Compare Range

Circle CI has the CIRCLE_COMPARE_URL which contains two SHAs that a particular build is using, when not using their 2.1 Pipelines. I see that we have access to GITHUB_SHA, GITHUB\_HEAD\_REF, and GITHUB\_REF. Unfortunately that doesn’t produce meaningful information (aside from GITHUB\_SHA) when not run in a Pull Request. The GITHUB\_REF always points to the current branch on the current fork. We can make lots of assumptions, like master...${GITHUB_SHA} but that only really works when working in a branch, and fails to produce any meaningful output when working on master (it tends to work on forks, aside from a few edge cases).

Does anyone have any ideas about how to accurately figure out what is being compared for a particular build on Github Actions?