Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ChristopherHX
Copy link
Contributor

@ChristopherHX ChristopherHX commented Sep 22, 2023

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% compatibility

Fixes #2019

@ChristopherHX ChristopherHX requested a review from a team as a code owner September 22, 2023 22:48
JobName: parent.JobName,
Run: &model.Run{
JobID: "composite-job",
JobID: parent.Run.JobID,
Copy link
Contributor Author

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

Comment on lines +41 to +42
env["GITHUB_ACTION_REPOSITORY"] = gh.ActionRepository
env["GITHUB_ACTION_REF"] = gh.ActionRef
Copy link
Contributor Author

@ChristopherHX ChristopherHX Sep 22, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 3 0 0.03s
✅ REPOSITORY gitleaks yes no 3.23s
✅ REPOSITORY git_diff yes no 0.23s
✅ REPOSITORY grype yes no 10.22s
✅ REPOSITORY secretlint yes no 3.66s
✅ REPOSITORY trivy-sbom yes no 0.87s
✅ REPOSITORY trufflehog yes no 21.08s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #2020 (98fa122) into master (4989f44) will increase coverage by 0.51%.
Report is 249 commits behind head on master.
The diff coverage is 60.73%.

@@            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     
Files Coverage Δ
pkg/common/executor.go 51.69% <100.00%> (+1.69%) ⬆️
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/runner/job_executor.go 88.48% <100.00%> (+0.79%) ⬆️
pkg/runner/step_action_local.go 93.54% <100.00%> (ø)
pkg/runner/step_action_remote.go 91.56% <100.00%> (+0.65%) ⬆️
pkg/runner/step_docker.go 93.18% <100.00%> (ø)
pkg/container/file_collector.go 37.30% <0.00%> (ø)
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/container/docker_build.go 60.00% <80.00%> (+1.02%) ⬆️
... and 30 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mergify mergify bot merged commit 976df8b into master Oct 3, 2023
@mergify mergify bot deleted the fix-actionRepository-actionRef-comp branch October 3, 2023 23:13
jmikedupont2 pushed a commit to meta-introspector/act that referenced this pull request Mar 10, 2024
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github.action_ref is empty when accessed within env in a composite action

3 participants