1
0
mirror of synced 2025-12-30 03:01:36 -05:00

Un-hard-code repo in deployment Checks API calls (#21246)

This commit is contained in:
James M. Greene
2021-09-01 16:40:58 -05:00
committed by GitHub
parent 87f63a8b2f
commit 581bf4529e

View File

@@ -42,13 +42,15 @@ jobs:
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
script: |
const { owner, repo } = context.repo
// Create a check run
const CHECK_NAME = '${{ github.workflow }} / ${{ github.job }} (${{ github.event_name }})'
const { data } = await github.checks.create({
name: CHECK_NAME,
head_sha: '${{ github.event.workflow_run.head_sha }}',
owner: 'github',
repo: 'docs-internal',
owner,
repo,
status: 'in_progress',
started_at: new Date()
})
@@ -238,8 +240,8 @@ jobs:
})
await octokit.checks.update({
owner: 'github',
repo: 'docs-internal',
owner,
repo,
conclusion: 'success',
status: 'completed',
name: CHECK_RUN_NAME,
@@ -253,8 +255,8 @@ jobs:
})
} catch (error) {
await octokit.checks.update({
owner: 'github',
repo: 'docs-internal',
owner,
repo,
conclusion: 'failure',
status: 'completed',
name: CHECK_RUN_NAME,