Merge branch 'main' of https://github.com/github/docs-internal into hidden-docs-alt
This commit is contained in:
24
.github/workflows/repo-freeze-reminders.yml
vendored
Normal file
24
.github/workflows/repo-freeze-reminders.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Repo Freeze Reminders
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "00 11 * * *" # once per day around 11:00am UTC
|
||||
|
||||
env:
|
||||
FREEZE: ${{ secrets.FREEZE }}
|
||||
|
||||
jobs:
|
||||
check-freezer:
|
||||
name: Remind about deployment freezes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Send Slack notification if repo is frozen
|
||||
if: ${{ env.FREEZE == 'true' }}
|
||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||
SLACK_USERNAME: docs-repo-sync
|
||||
SLACK_ICON_EMOJI: ':freezing_face:'
|
||||
SLACK_COLOR: '#51A0D5' # Carolina Blue
|
||||
SLACK_MESSAGE: All repo-sync runs will fail for ${{ github.repository }} because the repo is currently frozen!
|
||||
18
.github/workflows/repo-sync.yml
vendored
18
.github/workflows/repo-sync.yml
vendored
@@ -14,8 +14,8 @@ env:
|
||||
FREEZE: ${{ secrets.FREEZE }}
|
||||
|
||||
jobs:
|
||||
repo-sync:
|
||||
name: Repo Sync
|
||||
check-freezer:
|
||||
name: Check for deployment freezes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -25,6 +25,12 @@ jobs:
|
||||
echo 'The repo is currently frozen! Exiting this workflow.'
|
||||
exit 1 # prevents further steps from running
|
||||
|
||||
repo-sync:
|
||||
name: Repo Sync
|
||||
needs: check-freezer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
|
||||
|
||||
@@ -39,7 +45,7 @@ jobs:
|
||||
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
|
||||
- name: Create pull request
|
||||
uses: repo-sync/pull-request@ea6773388b83b337e4da9a223293309f2c3670e7
|
||||
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
|
||||
with:
|
||||
@@ -56,6 +62,7 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: repo-sync
|
||||
base: main
|
||||
|
||||
- name: Approve pull request
|
||||
if: ${{ steps.find-pull-request.outputs.number }}
|
||||
@@ -66,7 +73,10 @@ jobs:
|
||||
|
||||
- name: Send Slack notification if workflow fails
|
||||
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
|
||||
if: failure()
|
||||
if: ${{ failure() }}
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
|
||||
SLACK_USERNAME: docs-repo-sync
|
||||
SLACK_ICON_EMOJI: ':ohno:'
|
||||
SLACK_COLOR: '#B90E0A' # Crimson
|
||||
SLACK_MESSAGE: The last repo-sync run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions?query=workflow%3A%22Repo+Sync%22
|
||||
|
||||
Reference in New Issue
Block a user