feat: expose actor argument #9
Merged
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
A harness user is trying to use a github action composite while attempting to migrate from GHA to harness CIE. In doing so they attempted to use an image that relied on GITHUB_ACTOR env var, but were unable to set this var in the CI step.
Upon investigation it seems that this ENV var is set by the
nektos/act
cmd and not souced from the env.solution
Add another setting to the plugin for an actor, and pass this thru to the same actor argument in act.
Source of the option in act: https://github.com/nektos/act/blob/master/cmd/root.go#L66
You can leave the setting out and it reverts back to the default of
nektos/act
testing
There were no docs for what tests to do when contributing here, so I made my changes, linted the code, use the drone config to push my version to my own image
rssnyder/github-actions
and ran an action that would verify I was able to set the github actor.before
Execution link: https://app.harness.io/ng/#/account/wlgELJ0TTre5aZhzpt8gVA/cd/orgs/default/projects/development/pipelines/plugin/executions/hytRolBBRAiHGQPsuyBt1g/pipeline?stage=lhOy6gGlS5-Q_J2nUox0CQ&step=Er7aTlfbSk6oP4UX9gaK9w
after
Execution link: https://app.harness.io/ng/#/account/wlgELJ0TTre5aZhzpt8gVA/cd/orgs/default/projects/development/pipelines/plugin/executions/EObWRJsBSgWhN8s4fzizvA/pipeline?stage=kygRQHDiT6KjyhSg3sORcQ&step=yoU-3_XJTwq4aUw-gpuv1g