Skip to content

Repo sync

Repo sync #32155

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:
merge_group:
pull_request_target:
types:
- opened
- reopened
- synchronize
- ready_for_review
- unlocked
branches:
- main
permissions:
contents: read
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: Check out repo
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- 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
- uses: ./.github/actions/slack-alert
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}