diff --git a/.github/actions-scripts/staging-deploy.js b/.github/actions-scripts/staging-deploy.js index a3d5d6fd51..42e5c5f560 100755 --- a/.github/actions-scripts/staging-deploy.js +++ b/.github/actions-scripts/staging-deploy.js @@ -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({ diff --git a/.github/workflows/staging-deploy-pr.yml b/.github/workflows/staging-deploy-pr.yml index 84e53706ce..79f5c2511a 100644 --- a/.github/workflows/staging-deploy-pr.yml +++ b/.github/workflows/staging-deploy-pr.yml @@ -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