github / github/vscode-github-actions

Unrecognized Github Actions Secret Context

未關閉
#461 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
TypeScript
星號
660
分支
213
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
- I have a GitHub Actions workflow, VSCode recommended me the Extension.
- And i use the Environment Feature for GitHub Action Secrets.
- This is not recognized by the Extension,
- even that the Environment Secrets works when i let the Action run.
- Even more frustrating:
- there seems to be no option to ignore or comment out that warning that the secret isn't valid
- we need an option to ignore that if the Extension fails to read the environment context

**To Reproduce**
Steps to reproduce the behavior:
1. The beginning of the Jobs YAML:

jobs:
test:
runs-on: ubuntu-latest
environment: TWITCH-DOWNLOADER
...

2. The Step that Uses the Secrets:
- name: Schreibe Secrets in .env-Datei
run: |
echo "TWITCH_CLIENT_ID=${{ secrets.TWITCH_CLIENT_ID }}" >> .env
echo "TWITCH_CLIENT_SECRET=${{ secrets.TWITCH_CLIENT_SECRET }}" >> .env

The Repo itself private, but i guess the error is easy to reproducible with
- create a repo
- creating a environment with that name (in https://github.com/(user)/(repo)/settings/secrets/actions)
- creating 2 Secrets named like that in that environment
- creating a github action yaml file with just that step above
- Save
- The Yaml loaded into VSCode with the GitHub Actions Extension running
X the Secrets will be recognized as missing or not defined X

**Expected behavior**
To recognize the Environment and the Secrets in there

貢獻指南

開啟貢獻指南

研究方向

Start by reproducing the warning with the provided jobs YAML, an environment named TWITCH-DOWNLOADER, and the two environment secrets referenced in the workflow. Trace how the GitHub Actions Extension validates secrets and environment context; done means the environment secrets are recognized without a missing-or-undefined warning.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github-actions, typescript, vscode
領域
ci-cd, devtools
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。