Skip to content

Unrecognized Github Actions Secret Context #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
EpsilonAlpha opened this issue Mar 30, 2025 · 1 comment
Open

Unrecognized Github Actions Secret Context #461

EpsilonAlpha opened this issue Mar 30, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@EpsilonAlpha
Copy link

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
...

  1. 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

@EpsilonAlpha
Copy link
Author

Here the Code Blocks for easier copy


on:
  push:
    branches:
      - master
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    environment: TWITCH-DOWNLOADER
    steps:
      - name: Schreibe Secrets in .env-Datei
        run: |
          echo "TWITCH_CLIENT_ID=${{ secrets.TWITCH_CLIENT_ID }}" >> epa_tdl_token/.env
          echo "TWITCH_CLIENT_SECRET=${{ secrets.TWITCH_CLIENT_SECRET }}" >> epa_tdl_token/.env

Sry i'm not used that much to the comments on Github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog 🗒
Development

No branches or pull requests

1 participant