File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,8 +24,31 @@ concurrency:
2424 group : ${{ github.workflow }}-${{ github.ref }}
2525
2626jobs :
27+ check-permissions :
28+ runs-on : ubuntu-latest
29+ env :
30+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ steps :
32+ - name : Check Main Branch
33+ if : github.ref != 'refs/heads/main'
34+ run : |
35+ echo "❌ Этот workflow может быть запущен только на основной ветке (main)"
36+ exit 1
37+
38+ - name : Verify Release Team
39+ run : |
40+ RELEASE_TEAM_MEMBERS=$(gh api "orgs/cdek-it/teams/react-native-release/members" \
41+ --jq 'map(.login)')
42+
43+ if ! echo "$RELEASE_TEAM_MEMBERS" | grep -q "$GITHUB_ACTOR"; then
44+ echo "❌ Этот workflow может быть запущен только участниками команды release"
45+ exit 1
46+ fi
47+
48+ - run : exit 1
2749 install :
2850 runs-on : ubuntu-latest
51+ needs : check-permissions
2952 steps :
3053 - uses : actions/checkout@v6
3154 - uses : ./.github/actions/setup-node
You can’t perform that action at this time.
0 commit comments