-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid external PRs to github pages (#473)
We merge to gh-pages only during release. General PRs should be made to main.
- Loading branch information
1 parent
2595b4c
commit ca625c4
Showing
4 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Branch Policy | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- gh-pages | ||
|
||
jobs: | ||
check_author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Protected gh-pages | ||
run: | | ||
PR_AUTHOR="${{ github.actor }}" | ||
ALLOWED_AUTHORS=("connor4312" "roblourens") | ||
if [[ " ${ALLOWED_AUTHORS[@]} " =~ " ${PR_AUTHOR} " ]]; then | ||
echo "'${PR_AUTHOR}' is allowed to make PRs to gh-pages" | ||
else | ||
echo "'${PR_AUTHOR}' is not allowed to make PRs to 'gh-pages', please target the 'main' branch instead" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters