From 6506db70e4ca4be539bcdf9137a751a8a1bd1473 Mon Sep 17 00:00:00 2001 From: "ala'n (Alexey Stsefanovich)" Date: Tue, 8 Aug 2023 15:56:09 +0200 Subject: [PATCH] chore: fix permission step validation --- .github/workflows/release.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9eb55c786..b7777a56d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,17 +18,14 @@ jobs: steps: # Check permissions - - name: Checking out for permissions + - uses: tspascoal/get-user-teams-membership@v2 id: permissions - uses: kapost/kap-gh-team@v1 with: - access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - organization: exadel-inc - team: esl-core-maintainers - user: ${{ github.actor }} + username: ${{ github.actor }} + team: 'ESL Core Maintainers' + GITHUB_TOKEN: ${{ secrets.PERMISSION_CHECK_TOKEN }} - - name: Deny access if not a member of team - if: ${{ steps.permissions.outputs.success == 'false' }} + - if: ${{ steps.permissions.outputs.isTeamMember == 'false' }} run: exit 1 # Start workflow