1
0
mirror of synced 2026-01-04 09:06:46 -05:00

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
This commit is contained in:
James M. Greene
2020-11-10 23:57:28 -06:00
committed by GitHub
parent 1b5cdd82f5
commit 2a780be55b

27
.github/workflows/repo-freeze-check.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Repo Freeze Check
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- unlocked
branches:
- main
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
check-freezer:
name: Prevent merging during deployment freezes
runs-on: ubuntu-latest
steps:
- name: Fail if repo merges are paused
if: ${{ env.FREEZE == 'true' }}
run: |
echo 'Merges into the "main" branch on this repo are currently paused!'
exit 1