Skip to content

Commit 2a780be

Browse files
authored
Prevent merging to main branch during repo freezes (#16278)
* Prevent merging to main branch during repo freezes * Update failure wording to indicate merges are 'paused' * Clarify the merge pauses are only for the 'main' branch
1 parent 1b5cdd8 commit 2a780be

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Repo Freeze Check
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
- unlocked
11+
branches:
12+
- main
13+
14+
env:
15+
FREEZE: ${{ secrets.FREEZE }}
16+
17+
jobs:
18+
check-freezer:
19+
name: Prevent merging during deployment freezes
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- name: Fail if repo merges are paused
24+
if: ${{ env.FREEZE == 'true' }}
25+
run: |
26+
echo 'Merges into the "main" branch on this repo are currently paused!'
27+
exit 1

0 commit comments

Comments
 (0)