From 398737fadc29b824a9eb650859ef83f8178eb00e Mon Sep 17 00:00:00 2001 From: Mrityunjay Raj Date: Sat, 11 Jul 2026 03:52:23 +0530 Subject: [PATCH] ci: pass workflow_run id to github-script via env (#1227) --- .github/workflows/claude-auto-fix-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude-auto-fix-ci.yml b/.github/workflows/claude-auto-fix-ci.yml index 993545c6..4974656a 100644 --- a/.github/workflows/claude-auto-fix-ci.yml +++ b/.github/workflows/claude-auto-fix-ci.yml @@ -41,18 +41,22 @@ jobs: - name: Get CI failure details id: failure_details uses: actions/github-script@v7 + env: + RUN_ID: ${{ github.event.workflow_run.id }} with: script: | + const runId = Number(process.env.RUN_ID); + const run = await github.rest.actions.getWorkflowRun({ owner: context.repo.owner, repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }} + run_id: runId }); const jobs = await github.rest.actions.listJobsForWorkflowRun({ owner: context.repo.owner, repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }} + run_id: runId }); const failedJobs = jobs.data.jobs.filter(job => job.conclusion === 'failure');