-
Notifications
You must be signed in to change notification settings - Fork 60
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
Adds sh action #639
Adds sh action #639
Conversation
Hello @JayjeetAtGithub! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-05-11 07:14:22 UTC |
@ivotron You may have a look. |
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.
thanks a lot @JayjeetAtGithub! please take a look at the comments
9ef0343
to
e636038
Compare
@ivotron Please review ! Thanks. |
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.
thanks a lot @JayjeetAtGithub ! Please take a look at the comments. In addition, would it be possible to update the docs, in particular the end of this section (where we have a NOTE). What we need to specify is that for actions running on the host, the $PWD
is set to different values depending on whether an action is defined (i.e. an action folder is created), or uses="sh"
is used. In the former, $PWD
is set to the folder of the action, whereas in the latter it is set to the root of the project
cli/popper/gha.py
Outdated
|
||
if not self.dry_run: | ||
os.chdir(cwd) | ||
if cmd[0].startswith('./'): |
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.
in the case of uses = "sh"
, this does not apply, since we are running from the root of the project
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.
If we need to execute a bash script located in the root, then how to reference it ?
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.
do you mean something like the following?
action "run on host" {
uses = "sh"
runs = "./scriptatroot"
}
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.
can also be:
action "run on host" {
uses = "sh"
runs = "scriptatroot"
}
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.
@ivotron Thanks! Got it.
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.
yeah, that's a good idea!
0009bac
to
9055b62
Compare
9055b62
to
a79c71d
Compare
@ivotron Please check ! Thanks |
thanks @JayjeetAtGithub . Do you think you can add the changes to the docs in this PR as well? What I mentioned above. |
@ivotron Updated the docs. |
thanks a lot @JayjeetAtGithub ! |
Addresses #619