add run id env var (#23187)
This commit is contained in:
7
.github/actions-scripts/staging-deploy.js
vendored
7
.github/actions-scripts/staging-deploy.js
vendored
@@ -21,7 +21,10 @@ if (!HEROKU_API_TOKEN) {
|
||||
// instance to avoid versioning discrepancies.
|
||||
const octokit = getOctokit()
|
||||
|
||||
const { PR_URL, SOURCE_BLOB_URL, CONTEXT_NAME, ACTIONS_RUN_LOG, HEAD_SHA } = process.env
|
||||
const { RUN_ID, PR_URL, SOURCE_BLOB_URL, CONTEXT_NAME, ACTIONS_RUN_LOG, HEAD_SHA } = process.env
|
||||
if (!RUN_ID) {
|
||||
throw new Error('$RUN_ID not set')
|
||||
}
|
||||
if (!PR_URL) {
|
||||
throw new Error('$PR_URL not set')
|
||||
}
|
||||
@@ -57,7 +60,7 @@ await deployToStaging({
|
||||
forceRebuild: false,
|
||||
// These parameters will ONLY be set by Actions
|
||||
sourceBlobUrl: SOURCE_BLOB_URL,
|
||||
runId: context.runId,
|
||||
runId: RUN_ID,
|
||||
})
|
||||
|
||||
await github.repos.createCommitStatus({
|
||||
|
||||
1
.github/workflows/staging-deploy-pr.yml
vendored
1
.github/workflows/staging-deploy-pr.yml
vendored
@@ -499,6 +499,7 @@ jobs:
|
||||
ACTIONS_RUN_LOG: ${{ env.ACTIONS_RUN_LOG }}
|
||||
HEAD_SHA: ${{ needs.pr-metadata.outputs.head_sha }}
|
||||
ALLOWED_POLLING_FAILURES_PER_PHASE: '15'
|
||||
RUN_ID: ${{ github.run_id }}
|
||||
run: .github/actions-scripts/staging-deploy.js
|
||||
|
||||
- name: Mark the deployment as inactive if timed out
|
||||
|
||||
Reference in New Issue
Block a user