Skip to content

GitHub Action to get a user teams membership in a given organization

License

Notifications You must be signed in to change notification settings

marcocarvalho/team-membership

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

team-membership

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

Usage

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' }}
  ...

License

The scripts and documentation in this project are released under the MIT License

About

GitHub Action to get a user teams membership in a given organization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%