Permanent warnings (highlighting) for env vars set on GitHub environment level
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:
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:
To Reproduce Steps to reproduce the behavior:
- Reference in a workflow, an environment variable that is set on the GitHub env level
- Make sure that the
vscode-github-actionsextension is enabled - 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.
I guess this is new? I just had to uninstall the extension and use another. Hope this gets fixed.
No, this is nothing new. I've had this problem for at least a few months.
Duplicates #222