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:
2
.github/workflows/repo-freeze-check.yml
vendored
2
.github/workflows/repo-freeze-check.yml
vendored
@@ -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
|
||||
|
||||
15
.github/workflows/repo-sync-stalls.yml
vendored
15
.github/workflows/repo-sync-stalls.yml
vendored
@@ -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 }}
|
||||
|
||||
14
.github/workflows/repo-sync.yml
vendored
14
.github/workflows/repo-sync.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user