Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Jul 26, 2024
1 parent 6323842 commit 6a1172f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/findTeamMembers7.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Check user for team affiliation
on:
push:
pull_request:
branches:
- develop
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/findTeamMembers7b.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Find Team Members 6

name: Check user for team affiliation
on:
push:
workflow_dispatch:

pull_request:
branches:
- develop
jobs:
check_membership:
check-user:
name: Team affiliation
runs-on: ubuntu-latest
steps:
- name: Check if actor is a member of team
id: membership_check
uses: kapost/kap-gh-team@v1
- name: Check user for team affiliation
uses: tspascoal/get-user-teams-membership@v2
id: teamAffiliation
with:
access_token: ${{ github.token }}
organization: yourorg
team: yourteam
user: ${{ github.actor }}

- name: Fail workflow if not a team member
if: ${{ steps.membership_check.outputs.success == 'false' }}
run: exit 1
GITHUB_TOKEN: ${{ github.token }}
username: ${{ github.actor }}
team: your-team-name
- name: Stop workflow if user is no member
if: ${{ steps.teamAffiliation.outputs.isTeamMember == false }}
run: |
echo "You have no rights to trigger this job."
exit 1

0 comments on commit 6a1172f

Please sign in to comment.