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 10
10
11
11
jobs :
12
12
update :
13
- if : contains('["nattb8"]', github.actor)
14
13
runs-on : ubuntu-latest
15
-
16
14
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
+
17
24
- name : Checkout code
18
25
uses : actions/checkout@v3
19
26
You can’t perform that action at this time.
0 commit comments