Skip to content

Commit

Permalink
change tga
Browse files Browse the repository at this point in the history
  • Loading branch information
Esurio committed Aug 18, 2024
1 parent b7fc6e9 commit 1315c4c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/deploy-test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,13 @@ jobs:
- name: Check allowed users
id: check-allowed-users
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_ID: ${{ github.repository_owner_id }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
ALLOWED_USER: ${{ github.repository_owner_id }}
COMMENT_AUTHOR: ${{ github.event.comment.user.id }}
run: |
MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \
-o /dev/null -w '%{http_code}\n' -s)
if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then
echo "is-allowed-user=true" > $GITHUB_OUTPUT
if ["$COMMENT_AUTHOR" = "$ALLOWED_USER"]; then
echo "is-allowed-user=true" >> $GITHUB_OUTPUT
else
echo "is-allowed-user=false" > $GITHUB_OUTPUT
echo "is-allowed-user=false" >> $GITHUB_OUTPUT
fi
- name: Get PR ref
Expand Down

0 comments on commit 1315c4c

Please sign in to comment.