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
fix github.action_ref / github.job (composite action) #2020
Conversation
@@ -53,11 +56,11 @@ func newCompositeRunContext(ctx context.Context, parent *RunContext, step action | |||
Name: parent.Name, | |||
JobName: parent.JobName, | |||
Run: &model.Run{ | |||
JobID: "composite-job", | |||
JobID: parent.Run.JobID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github.job will use that value, composite-job is wrong in all cases
env["GITHUB_ACTION_REPOSITORY"] = gh.ActionRepository | ||
env["GITHUB_ACTION_REF"] = gh.ActionRef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the fastest fix I can imagine, everything else blows up my head
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov Report
@@ Coverage Diff @@
## master #2020 +/- ##
==========================================
+ Coverage 61.22% 61.74% +0.51%
==========================================
Files 46 52 +6
Lines 7141 8550 +1409
==========================================
+ Hits 4372 5279 +907
- Misses 2462 2848 +386
- Partials 307 423 +116
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I'm burning my fingers by touching this. The test avoid future regression, since it has never been covered by tests in the past.
I know that GITHUB_ACTION_REPOSITORY and GITHUB_ACTION_REF are not defined for composite actions like
INPUT_<name>
, but not everyone wanted to archive 100% compatibilityFixes #2019