Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

context.runAttempt is undefined using github-script v7 #566

Open
Labels
dependenciesPull requests that update a dependency file
@bplessis-swi

Description

@bplessis-swi

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: ubuntu-latest    timeout-minutes: 30    steps:      - uses: actions/github-script@v7        with:          script: |            const runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);            core.warning(`context.runAttempt content: ${context.runAttempt} - ${runAttempt}`);

Result in:
Warning: context.runAttempt content: undefined - 1

Expected behavior

context.runAttempt should hold the correct value according to the linkhttps://github.com/actions/toolkit/blob/main/packages/github/src/context.ts used in README.md

After 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 innpmjs date back to 10/10/2023 while the commit adding runAttempt date 28/10/2023 ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp