team-membership
ActionsTags
(2)GitHub Action to get the list of teams a user belongs in a given organization. It can also be optionally used to check if the user belongs to a given team
It emits one outputs which are available via the steps
output context
isTeamMember
- A boolean indicating if a user belongs to a given team
See action.yml
Checks if the user who triggered the worfklow (actor) doesn't belong to the octocats
team
- uses: marcocarvalho/team-membership@v3
id: checkUserMember
with:
username: ${{ github.actor }}
team: 'octocats'
- if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }}
...
The scripts and documentation in this project are released under the MIT License
team-membership is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.