Skip to content

Commit fce7e3c

Browse files
authored
add run id env var (github#23187)
1 parent 224194b commit fce7e3c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/actions-scripts/staging-deploy.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ if (!HEROKU_API_TOKEN) {
2121
// instance to avoid versioning discrepancies.
2222
const octokit = getOctokit()
2323

24-
const { PR_URL, SOURCE_BLOB_URL, CONTEXT_NAME, ACTIONS_RUN_LOG, HEAD_SHA } = process.env
24+
const { RUN_ID, PR_URL, SOURCE_BLOB_URL, CONTEXT_NAME, ACTIONS_RUN_LOG, HEAD_SHA } = process.env
25+
if (!RUN_ID) {
26+
throw new Error('$RUN_ID not set')
27+
}
2528
if (!PR_URL) {
2629
throw new Error('$PR_URL not set')
2730
}
@@ -57,7 +60,7 @@ await deployToStaging({
5760
forceRebuild: false,
5861
// These parameters will ONLY be set by Actions
5962
sourceBlobUrl: SOURCE_BLOB_URL,
60-
runId: context.runId,
63+
runId: RUN_ID,
6164
})
6265

6366
await github.repos.createCommitStatus({

.github/workflows/staging-deploy-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ jobs:
499499
ACTIONS_RUN_LOG: ${{ env.ACTIONS_RUN_LOG }}
500500
HEAD_SHA: ${{ needs.pr-metadata.outputs.head_sha }}
501501
ALLOWED_POLLING_FAILURES_PER_PHASE: '15'
502+
RUN_ID: ${{ github.run_id }}
502503
run: .github/actions-scripts/staging-deploy.js
503504

504505
- name: Mark the deployment as inactive if timed out

0 commit comments

Comments
 (0)