github / vscode-github-actions

GitHub Actions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions
MIT License
481 stars 77 forks source link

Validator incorrectly flags runner.debug as invalid #365

Closed walbourn closed 1 month ago

walbourn commented 1 month ago

Add to a GitHub Actions YAML file (assuming a Windows runner)

jobs:
  build:
    steps:
    - name: Test
      shell: cmd 
      working-directory: ${{ github.workspace }}
      run: ctest --preset=${{ matrix.build_type }} %CTEST_DEBUG_OPTS%
      env:
        CTEST_DEBUG_OPTS: ${{ runner.debug == '1' && '--output-on-failure' || '' }}

The VS Code Extensions flags it as a warning:

"Context access might be invalid"

Per this PR, this was previously undocumented but is supported:

https://github.com/github/docs/pull/19404

Note that runner.debug doesn't work at global scope or at job scope, only at steps.

muzimuzhi commented 1 month ago

Already reported in the actions/languageservices repo: