Skip to content
at-sign

GitHub Action

team-membership

v3 Latest version

team-membership

at-sign

team-membership

Get a user team membership in an organization

Installation

Copy and paste the following snippet into your .yml file.

              

- name: team-membership

uses: marcocarvalho/team-membership@v3

Learn more about this action in marcocarvalho/team-membership

Choose a version

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