github / github/vscode-github-actions
Value 'release' is not valid for `environment` in a job
- 主要语言
- TypeScript
- 星标
- 660
- 派生
- 213
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
评估
这个 Issue 还没有评估数据。