I encountered the following use case.
Certain actions in a workflow should activate, only when the actor is the owner. This condition is created in order to disable certain actions on a PR from a forked/feature to upstream/master, but be enabled in any other push or PR case:
if: github.repository_owner == github.actor
There is the possibility of a member of an organization to be the actor, which would mean that the above condition will return false, because the owner is the organization. However, if the actor in this case is a member, the desired outcome is for the condition to return true, since a member of an organization logically (in the context of the condition) is owner.
Is there a way to check if the actor is a member ? - something like:
if: (github.repo.members).contains(github.actor) // true