-
Notifications
You must be signed in to change notification settings - Fork 28
Update usage guide to mention github.actor instead of the legacy approaches #22
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
base: main
Are you sure you want to change the base?
Conversation
On the other hand, the string The slash has to be deleted from the actor context in my opinion, prior documenting such a way to skip steps. Due to me thinking documenting this, make the bar higher for that bug to get ever fixed The slash is problematic, because programs parsing the actor expect no slash anywhere |
Tbh, I was thinking of that when I was writing this too. Normally, actor should be a username which means there's a clear character set allowed by GitHub. The slash violates that, and if people are inserting it into places and doing funky things like for example using it in the filename, things can go horribly wrong. Can we change the value to something else quickly (and make a new major release due to backwards compatibility)? I'm not sure what would be best, since you don't want a collision with an actual username. Then we can also update and merge this PR, and get people using something more reliable going forward. |
Interesting discovery (while trying to figure out why the docs are lying to me about how to pass secrets to reusable workflows, I came across this): dependabot/dependabot-core#3253 (comment) The github.actor for dependabot is Snippet from the link above
Perhaps for act we could do something like |
How do you think your proposal would work to detect act if you do
? In some scenarios it might be required that the actor is correctly set, but still steps should be skipped on act This would be resolved by just not deleting old content that is more stable regarding this aspect |
Why not make |
@@ -151,43 +151,25 @@ To see more examples, go to <https://github.com/joho/godotenv/tree/v1.4.0/fixtur | |||
|
|||
## Skipping jobs | |||
|
|||
You cannot use the `env` context in job level if conditions, but you can add a custom event property to the `github` context. You can use this method also on step level if conditions. | |||
You can take advantage of the github.actor context property, which is normally the user who initiated the workflow. Act sets this to 'nektos/act'. |
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.
You can take advantage of the github.actor context property, which is normally the user who initiated the workflow. Act sets this to 'nektos/act'. | |
You can take advantage of the github.actor context property, which is normally the user who initiated the workflow. Act sets this to `nektos/act`. |
I'm inclined to favor:
|
Related to nektos/act#2115