Skip to content

Commit

Permalink
fix deploy test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Esurio committed Aug 18, 2024
1 parent b7fc6e9 commit bf128c5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/deploy-test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,12 @@ jobs:
ORG_ID: ${{ github.repository_owner_id }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
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
ALLOWED_USERS="60435625"
COMMENT_AUTHOR="${{ github.event.comment.user.id }}"
if [[ ",$ALLOWED_USERS," == *",$COMMENT_AUTHOR,"* ]]; 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 bf128c5

Please sign in to comment.