From 6a1172f38feba7a125cc019653d4c0793c899286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Bl=C3=A4cker?= Date: Fri, 26 Jul 2024 09:13:26 +0700 Subject: [PATCH] test --- .github/workflows/findTeamMembers7.yml | 1 + .github/workflows/findTeamMembers7b.yml | 34 ++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/findTeamMembers7.yml b/.github/workflows/findTeamMembers7.yml index a3aaca2b4..1fedd8472 100644 --- a/.github/workflows/findTeamMembers7.yml +++ b/.github/workflows/findTeamMembers7.yml @@ -1,5 +1,6 @@ name: Check user for team affiliation on: + push: pull_request: branches: - develop diff --git a/.github/workflows/findTeamMembers7b.yml b/.github/workflows/findTeamMembers7b.yml index d7f8eca18..eb2bd8f74 100644 --- a/.github/workflows/findTeamMembers7b.yml +++ b/.github/workflows/findTeamMembers7b.yml @@ -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