1
0
mirror of synced 2026-01-04 18:06:26 -05:00

Allow Repo Sync to continue running during freezes (#17924)

When we do deploy changes during freezes, we want them kept in sync with
the public github/docs repo. Especially during GitHub events.

Co-authored-by: chiedo <chiedo@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
This commit is contained in:
Chiedo John
2021-02-22 08:30:14 -05:00
committed by GitHub
parent 8a750dbb1b
commit a8a2bbe27f
3 changed files with 2 additions and 29 deletions

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Fail if repo merges are paused
if: ${{ env.FREEZE == 'true' }}
if: ${{ env.FREEZE == 'true' && github.ref != 'refs/heads/repo-sync' }}
run: |
echo 'Merges into the "main" branch on this repo are currently paused!'
exit 1

View File

@@ -5,20 +5,7 @@ on:
schedule:
- cron: '0 */2 * * *'
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
check-freezer:
name: Check for deployment freezes
runs-on: ubuntu-latest
steps:
- name: Exit if repo is frozen
if: ${{ env.FREEZE == 'true' }}
run: |
echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running
repo-sync-stalls:
runs-on: ubuntu-latest
steps:
@@ -60,7 +47,7 @@ jobs:
})
- name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
if: ${{ failure() && env.FREEZE != 'true' }}
if: ${{ failure() }}
with:
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

View File

@@ -11,24 +11,10 @@ on:
schedule:
- cron: '*/15 * * * *' # every 15 minutes
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
check-freezer:
name: Check for deployment freezes
runs-on: ubuntu-latest
steps:
- name: Exit if repo is frozen
if: ${{ env.FREEZE == 'true' }}
run: |
echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running
repo-sync:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
name: Repo Sync
needs: check-freezer
runs-on: ubuntu-latest
steps:
- name: Check out repo