forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 979 Bytes
/
repo-freeze-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Repo Freeze Check
# **What it does**: Prevent pull requests from merging during freezes.
# **Why we have it**: Sometimes we need to freeze deployments for various reasons.
# **Who does it impact**: Anyone working on docs.
on:
workflow_dispatch:
pull_request_target:
types:
- opened
- reopened
- synchronize
- ready_for_review
- unlocked
branches:
- main
push:
branches:
- gh-readonly-queue/main/**
permissions:
contents: none
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
check-freezer:
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}
name: Prevent merging during deployment freezes
runs-on: ubuntu-latest
steps:
- name: Fail if repo merges are paused
if: ${{ env.FREEZE == 'true' && github.head_ref != 'repo-sync' }}
run: |
echo 'Merges into the "main" branch on this repo are currently paused!'
exit 1