1
0
mirror of synced 2026-01-08 12:01:53 -05:00

Merge branch 'main' into patch-3

This commit is contained in:
Mike Surowiec
2021-10-05 15:02:17 -04:00
committed by GitHub
74 changed files with 152 additions and 149 deletions

View File

@@ -209,7 +209,8 @@ jobs:
PR_NUMBER: ${{ needs.pr-metadata.outputs.number }}
with:
script: |
const sleep = require('await-sleep') // Does not require ESM
// Equivalent of the 'await-sleep' module without the install
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
const blockingLabel = 'automated-block-deploy'
const { owner, repo } = context.repo

View File

@@ -12,6 +12,7 @@ on:
permissions:
contents: read
deployments: write
pull-requests: write
# This prevents one Undeploy workflow run from interrupting another
concurrency:
@@ -42,6 +43,7 @@ jobs:
echo 'Cancelling other deployment runs (if any)...'
undeploy:
needs: cancel-jobs-before-undeploy
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}
runs-on: ubuntu-latest
timeout-minutes: 5
@@ -50,9 +52,9 @@ jobs:
- name: Add a label to the PR to block deployment during undeployment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit $PR_NUMBER --add-label "automated-block-deploy"
gh pr edit "$PR_URL" --add-label "automated-block-deploy"
- name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
@@ -119,9 +121,9 @@ jobs:
name: Remove the label from the PR to unblock deployment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit $PR_NUMBER --remove-label "automated-block-deploy"
gh pr edit "$PR_URL" --remove-label "automated-block-deploy"
- name: Send Slack notification if workflow failed
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd