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.
コントリビューションガイド
調査の方向性
Start with workflow-parser/src/workflow-v1.0.json and languageservice/src/validate.ts at the linked definitions and validation code. Reproduce a workflow using environment: release and trace why it is rejected; done means arbitrary environment names such as release no longer produce a validation error in VS Code.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions, typescript, vscode
- 領域
- ci-cd, devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100