-
Notifications
You must be signed in to change notification settings - Fork 710
fix: github action ref doesn't checkout that ref #4774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alisonlhart
merged 2 commits into
ansible:main
from
rohun-apex:fix-github-action-ref-doesnt-checkout-that-ref
Oct 22, 2025
Merged
fix: github action ref doesn't checkout that ref #4774
alisonlhart
merged 2 commits into
ansible:main
from
rohun-apex:fix-github-action-ref-doesnt-checkout-that-ref
Oct 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7633986 to
a05ce5d
Compare
a05ce5d to
7eb2d81
Compare
alisonlhart
approved these changes
Oct 7, 2025
Contributor
Author
|
Thanks @alisonlhart !! Two problems which I'm happy to resolve, but could use some guidance on.
|
64f1608 to
6469d15
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The below code block will checkout ansible-lint at main. Proof:
Using ansible-lint ref: mainwill show up in the GHA (see "Was" section of verification below). Expected: it should checkout ansible-lint atv25.8.2.Explanation
This is believed to be because of a long-standing bug for github variables in a composite action (see below linked issues), which this
action.ymlseems to be. Given that root bug hasn't been fixed since 2023, it effectively becomes a bug manifested in ansible-lint.GITHUB_ACTION_REFandGITHUB_ACTION_REPOSITORYactions/runner#2525github.action_repositoryandgithub.action_refare empty inrunfor composite actions actions/runner#2473Following a similar example to actions/runner#2525 , I have renamed that variable so it gets around the bug in GHAs.
Verification
Was:
maindespite specifying the tag to use (see top line of image).Is: