File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ USER=$1
4+ TOKEN=$2
5+
6+ response=$( curl -s -H " Authorization: token $TOKEN " " https://api.github.com/orgs/immutable/teams/sdk/memberships/$USER " )
7+
8+ if echo " $response " | grep -q ' "state": "active"' ; then
9+ echo " true"
10+ else
11+ echo " false"
12+ fi
Original file line number Diff line number Diff line change 1010
1111jobs :
1212 update :
13- if : contains('["nattb8"]', github.actor)
1413 runs-on : ubuntu-latest
15-
1614 steps :
15+ - name : Check team membership
16+ id : check_team
17+ run : |
18+ IS_MEMBER=$(./.github/scripts/check_team_membership.sh "${{ github.actor }}" "${{ secrets.GITHUB_TOKEN }}")
19+ if [[ "$IS_MEMBER" != "true" ]]; then
20+ echo "Not a member of the SDK team, skipping update"
21+ exit 1
22+ fi
23+
1724 - name : Checkout code
1825 uses : actions/checkout@v3
1926
You can’t perform that action at this time.
0 commit comments