github / github/vscode-github-actions

Value 'release' is not valid for `environment` in a job

Offen
#402 0 Kommentare 9 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
TypeScript
Sterne
660
Forks
213
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I was following the [PyPI doc to setup trusted publisher with GitHub Actions](https://docs.pypi.org/trusted-publishers/using-a-publisher/), but I encountered this error in VS Code with the extension.

I think this is a false positive because`environment` seems to be able to be an arbitrary string, as the [GitHub doc describes](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment).

I was able to trace the issue down to [the language server's definition of the environment value](https://github.com/actions/languageservices/blob/3a8c29c2df26d94c6fd07c7a918a0dfabedba685/workflow-parser/src/workflow-v1.0.json#L1950-L1953), and also the [code that validated it but failed](https://github.com/actions/languageservices/blob/3a8c29c2df26d94c6fd07c7a918a0dfabedba685/languageservice/src/validate.ts#L143-L145). I didn't have time to dig in further, and hope this helps.

image

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.