You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
github.ref is empty for workflows triggered by release #2788
2023-08-23T09:37:27.3087882Z ##[group]Run if [[ "" == refs/tags/release/* ]] ; then
2023-08-23T09:37:27.3088257Z �[36;1mif [[ "" == refs/tags/release/* ]] ; then�[0m
2023-08-23T09:37:27.3088599Z �[36;1m current_version=$( echo | cut -c19- )�[0m
2023-08-23T09:37:27.3088944Z �[36;1m echo "version_number=${current_version}" >> $GITHUB_OUTPUT�[0m
2023-08-23T09:37:27.3089250Z �[36;1melse�[0m
2023-08-23T09:37:27.3089574Z �[36;1m echo "::error ::Could not determine the version number using ref "�[0m
2023-08-23T09:37:27.3089900Z �[36;1m exit 1�[0m
2023-08-23T09:37:27.3090122Z �[36;1mfi�[0m
This did work 3 weeks ago with runner version: '2.307.1'.
OS of the machine running the runner: linux
Runner version: 2.308.0
Reacted by Steve Taylor, gjhenrique-prezi, Mike Carey, Sireikis, mag42c, Michael Arrington, Stephen Costeira, Kyle Zawacki, Tim Bunch, Eric Agnew and 57 more
I can confirm that this also used to work for us and recently broke. We are going to have to change a lot of workflows if we need to implement the workaround which is to use a different variable: github.event.head_commit.ref. It appears it is not just on release that this is causing issues.
Reacted by Michael Arrington, Stephen Costeira, Kyle Zawacki, Eric Agnew, Jamie Thompson, Justin Leatherwood, omris94, Martinez, Satoshi Okamura, Neha Viswanathan and 3 more
This issue has a significant impact on the delivery of the application I am working on.
The behavior is quite weird: sometimes the GITHUB_REF environment variable is well populated, sometimes it is empty.
Could someone from GitHub provide a clear status about this issue?
When this issue will be fixed?
Is there a workaround we can setup in the meantime?
Thanks
Reacted by kitapashi, Yash Agarwal, David Richard, Sang Dang, Derek Diebold, Chris Wu, Andrew Ross, andre-lx, Rich Browne, Mike Carey and 2 more
Currently I'm trying to get the PR number from GITHUB_REF, my workflows is triggered by the deployment_status, and after 3 hours I found out it is empty.
I'm pretty sure there's an incident going on in the last couple of days that is causing this behaviour to happen 100% of the release triggers. We are also experiencing a huge delay between a release being created and it being listed in the /releases page.
My support ticket has been ignored, and I just found this 3-year-old bug. 🤡
Reacted by Mauricio Dada, Jeffrey Paul and dhiwakar-aidora
Activity
mike-carey commentedon Aug 30, 2023
I can confirm that this also used to work for us and recently broke. We are going to have to change a lot of workflows if we need to implement the workaround which is to use a different variable:
github.event.head_commit.ref. It appears it is not just on release that this is causing issues.Related threads:
slayoo commentedon Sep 6, 2023
Same here, our PyPI uploads stopped to work in August, we are using:
(https://github.com/open-atmos/PyPartMC/blob/main/.github/workflows/tests%2Bpypi.yml)
mariuszste commentedon Sep 14, 2023
the
GITHUB_REFenv variable is also emptyUse `github.event.release.tag_name`
Use `github.event.release.tag_name`
kakuzei commentedon Sep 27, 2023
This issue has a significant impact on the delivery of the application I am working on.
The behavior is quite weird: sometimes the
GITHUB_REFenvironment variable is well populated, sometimes it is empty.Could someone from GitHub provide a clear status about this issue?
When this issue will be fixed?
Is there a workaround we can setup in the meantime?
Thanks
flaxel commentedon Sep 27, 2023
A possible workaround could be the usage of the release event. 🙌 Then you can get the version with the following path:
github.event.release.tag_name.sangdth commentedon Oct 8, 2023
Currently I'm trying to get the PR number from
GITHUB_REF, my workflows is triggered by thedeployment_status, and after 3 hours I found out it is empty.Use github.event.release.tag_name in Deploy workflow
Use 'github.event.release.tag_name' instead of github.ref
Use 'github.event.release.tag_name' instead of github.ref (#1904)
Pick up correct tag name when triggered by a release
itsHenry35 commentedon Nov 3, 2023
same issue, so i use github.event.release.tag_name as a workaround


build: fix GitHub Actions bug with ref_name
21 remaining items
Fix GitHub release trigger actions borked
Fix docs workflow tag reference. (#1806)
Fix intermittend GHA ref_name is empty issue. See actions/runner#2788
Fix intermittend GHA ref_name is empty issue. See actions/runner#2788 (…
Use github.event.release.tag_name instead of github.ref_name (#21)
fix: switch release workflows from tag-push to release-published trigger
2026-03-27 (#2499)
ci: read release tag from event payload, not GITHUB_REF
bcmedeiros commentedon Jun 22, 2026
I'm pretty sure there's an incident going on in the last couple of days that is causing this behaviour to happen 100% of the release triggers. We are also experiencing a huge delay between a release being created and it being listed in the
/releasespage.My support ticket has been ignored, and I just found this 3-year-old bug. 🤡
devops: publish stable release on tag push instead of release event
ci: use tag name instead of GIT_REF
Derive the release version from the event payload
Derive the release version from the event payload
LAM-2384: take the release tag from the event payload, not GITHUB_REF
ci: pin npm release to this repo and verify provenance (LAM-2384) (#317)