github / github/vscode-github-actions
The `runner.environment` context is shown as invalid in this extension.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 660
- Forks
- 213
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, das bereitgestellte Workflow-Snippet in der Extension zu reproduzieren und den Kontextvalidierungspfad zu untersuchen, der die Problems-panel-Warnung erzeugt. Die Arbeit ist abgeschlossen, wenn runner.environment gemäß der verlinkten GitHub-Actions-Dokumentation zum Runner-Kontext erkannt wird und die Warnung für diesen Ausdruck nicht mehr erscheint.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100