github / github/vscode-github-actions
The `runner.environment` context is shown as invalid in this extension.
- Linguagem predominante
- TypeScript
- Estrelas
- 660
- Forks
- 213
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
**Describe the bug**
When we use the `runner.environment` context listed in [official document](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context), this extension reports "Context access might be invalid".
**To Reproduce**
Steps to reproduce the behavior:
1. With this workflow '...'
```yaml
steps:
- if: ${{ runner.environment == 'github-hosted' }}
run: echo "This is a ${{ runner.environment }} runner"
```
2. Do this '...'
Open the "Problems" Panel.
3. See error\
```plain
Context access might be invalid: environment
```
**Expected behavior**
The `runner.environment` context listed in [official document](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) can be recognized well by this extension.
**Screenshots**

**Extension Version**
`v0.27.0`
**Additional context**
Add any other context about the problem here.
Guia de contribuição
Direção de pesquisa
Start by reproducing the supplied workflow snippet in the extension and inspect the context-validation path that produces the Problems-panel warning. The work is done when runner.environment is recognized according to the linked GitHub Actions runner-context documentation and the warning no longer appears for this expression.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- typescript
- Domínio
- tooling
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100