From 038cba325f19d4bb5eec97783a6a3137b462166e Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Wed, 8 Sep 2021 14:58:34 -0700 Subject: [PATCH] observer FREEZE variable in search sync workflow (#21372) --- .github/workflows/sync-search-indices.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/sync-search-indices.yml b/.github/workflows/sync-search-indices.yml index 3397ca57d6..dff1fc6b28 100644 --- a/.github/workflows/sync-search-indices.yml +++ b/.github/workflows/sync-search-indices.yml @@ -24,12 +24,19 @@ on: schedule: - cron: '53 0/8 * * *' # Run every eight hours at 53 minutes past the hour +env: + FREEZE: ${{ secrets.FREEZE }} + jobs: updateIndexes: name: Update indexes if: github.repository == 'github/docs-internal' runs-on: ubuntu-latest steps: + - if: ${{ env.FREEZE == 'true' }} + run: | + echo 'The repo is currently frozen! Exiting this workflow.' + exit 1 # prevents further steps from running # Check out internal docs repository - name: checkout uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f