Skip to content

Permanent warnings (highlighting) for env vars set on GitHub environment levelΒ #523

@JakubSzuber

Description

@JakubSzuber

Describe the bug
I always see a yellow (warning) highlighting for every environment variable that is not directly defined inside the workflow but is properly set on GitHub environment level:

Image
Image

I see those warnings even though this env var is properly set, workflow is working fine, and I'm logged in to VSCode to my GitHub account. I also logged into my GitHub account inside the interface of this extension.

The interface of this extension is able to see that this var exists, so the highlighting in this case seems to be a bug:

Image

To Reproduce
Steps to reproduce the behavior:

  1. Reference in a workflow, an environment variable that is set on the GitHub env level
  2. Make sure that the vscode-github-actions extension is enabled
  3. Highlighting occurs

Expected behavior
There is no highlighting because the workflow is able to successfully use this variable, so there is no reason to show a warning (I'm logged in to my GitHub account in VS Code, and I have all permissions to see this variable that causes highlighting).

Extension Version
v0.28.0

Additional context

I have the following GHA workflow:

name: My Workfloe

on:
  workflow_dispatch:

jobs:
  test-linting-templating-and-installing:
    runs-on: ubuntu-24.04
    steps:
      - name: Configure AWS credentials from the AWS account
        uses: aws-actions/[email protected]
        with:
          role-to-assume: "arn:aws:iam::${{ secrets.aws_management_account_id }}:role/iam-${{ inputs.github_env_name }}-role_gh_oidc_eks-global"
          aws-region: ${{ vars.AWS_REGION }}
          role-session-name: GitHub-OIDC-K8s-GitOps

And aws-region: ${{ vars.AWS_REGION }} is always highlighted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog πŸ—’

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions