Title: context.runAttempt is undefined using github-script v7 · Issue #566 · actions/github-script · GitHub
Open Graph Title: context.runAttempt is undefined using github-script v7 · Issue #566 · actions/github-script
X Title: context.runAttempt is undefined using github-script v7 · Issue #566 · actions/github-script
Description: Describe the bug Attempting to access GITHUB_RUN_ATTEMPT using context.runAttempt gives back undefined To Reproduce Steps to reproduce the behavior: Create following test workflow and run it on: workflow_dispatch: jobs: deploy: runs-on: ...
Open Graph Description: Describe the bug Attempting to access GITHUB_RUN_ATTEMPT using context.runAttempt gives back undefined To Reproduce Steps to reproduce the behavior: Create following test workflow and run it on: wo...
X Description: Describe the bug Attempting to access GITHUB_RUN_ATTEMPT using context.runAttempt gives back undefined To Reproduce Steps to reproduce the behavior: Create following test workflow and run it on: wo...
Opengraph URL: https://github.com/actions/github-script/issues/566
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"context.runAttempt is undefined using github-script v7","articleBody":"**Describe the bug**\n\nAttempting to access GITHUB_RUN_ATTEMPT using context.runAttempt gives back undefined \n\n**To Reproduce**\nSteps to reproduce the behavior:\n\nCreate following test workflow and run it\n```\non:\n workflow_dispatch:\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n timeout-minutes: 30\n steps:\n\n - uses: actions/github-script@v7\n with:\n script: |\n const runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);\n core.warning(`context.runAttempt content: ${context.runAttempt} - ${runAttempt}`);\n```\n\nResult in:\nWarning: context.runAttempt content: undefined - 1\n\n**Expected behavior**\n\ncontext.runAttempt should hold the correct value according to the link https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts used in README.md\n\nAfter looking at the actions/toolkit repository i wonder if the version linked was actually released at all, the actions/toolkit repo don't have any tags for `@actions/github-6.0.0` and the release in [npmjs](https://www.npmjs.com/package/@actions/github/v/6.0.0?activeTab=versions) date back to 10/10/2023 while the commit adding runAttempt date 28/10/2023 ..\n","author":{"url":"https://github.com/bplessis-swi","@type":"Person","name":"bplessis-swi"},"datePublished":"2025-03-20T11:09:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/566/github-script/issues/566"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:843843b4-55a4-7b36-16f3-f6aedc4a064d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9244:320964:D467FC:11CF9E0:6A4C5B79 |
| html-safe-nonce | 5dde9b10038de323f3166b772ceb40b3c6504651c4b4be74fcdfb7d84bd0ec4f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjQ0OjMyMDk2NDpENDY3RkM6MTFDRjlFMDo2QTRDNUI3OSIsInZpc2l0b3JfaWQiOiIzNDIxNzEyMDE3NDI0OTMxNzA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 032dae026522f706235f2817dcc9b4529088687f81ac8ac07e6e5d4ddd3c2941 |
| hovercard-subject-tag | issue:2935042342 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/github-script/566/issue_layout |
| twitter:image | https://opengraph.githubassets.com/db189613862700e4afdc6ed00a1270186b448d75c6755d1dd193992d59e3a6d7/actions/github-script/issues/566 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/db189613862700e4afdc6ed00a1270186b448d75c6755d1dd193992d59e3a6d7/actions/github-script/issues/566 |
| og:image:alt | Describe the bug Attempting to access GITHUB_RUN_ATTEMPT using context.runAttempt gives back undefined To Reproduce Steps to reproduce the behavior: Create following test workflow and run it on: wo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bplessis-swi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/github-script git https://github.com/actions/github-script.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 205262760 |
| octolytics-dimension-repository_nwo | actions/github-script |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 205262760 |
| octolytics-dimension-repository_network_root_nwo | actions/github-script |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 14099438da5379150f15a2892474c7c7e6c0e55e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width