GeezerVison is showing github.com — fix(release): limit stable releases to named actors · drpr/opencode@1017760
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/release/plan-release.sh +4-6Lines changed: 4 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
7 | 7 | # push or dispatch on beta -> beta 0.0.0-beta-<run> desktop only |
8 | 8 | # pull_request -> pr 0.0.0-pr-<run> everything, dry run |
9 | 9 | # |
10 | | -# Releasers are actors with the admin or maintain role on the repository (the releasers team has maintain). |
| 10 | +# Stable releases are limited to the GitHub logins listed below (case-insensitive). |
11 | 11 | . "$(dirname "$0")/lib.sh" |
12 | 12 |
|
13 | 13 | versioned=false |
|
27 | 27 | if [ "$channel" = latest ]; then |
28 | 28 | actor=${GITHUB_TRIGGERING_ACTOR:-${GITHUB_ACTOR:-}} |
29 | 29 | [ -n "$actor" ] || die "Stable releases can only be started by releasers; the triggering actor is unknown" |
30 | | - role=$(gh api "repos/$GITHUB_REPOSITORY/collaborators/$actor/permission" --jq .role_name) || role="" |
31 | | - case "$role" in |
32 | | - admin | maintain) ;; |
33 | | - *) die "Stable releases can only be started by releasers (admin or maintain on the repo); $actor has ${role:-no readable role}" ;; |
34 | | - esac |
| 30 | + if ! (shopt -s nocasematch; [[ "$actor" = thdxr || "$actor" = Hona || "$actor" = rekram1-node ]]); then |
| 31 | + die "$actor is not allowed to start stable releases" |
| 32 | + fi |
35 | 33 | fi |
36 | 34 |
|
37 | 35 | if [ "$channel" = latest ] && [ -n "${INPUT_VERSION:-}" ]; then |
|