vscode-github-actions: Context access might be invalid: ACT

Describe the bug I believe this is a quality of life issue rather than a bug. It would be nice for there to be a documented way, perhaps a quick actions, to ignore certain warnings.

The issue is that if: ${{ !env.ACT }} warns that ACT might be invalid. Which it will be when not running in an environment that defines ACT. Not sure if warning that an environment variable might not be declared is useful.

To Reproduce Steps to reproduce the behavior:

  1. Create any workflow block that contains an if statement referencing an environment variable that isn’t declared in an env block.

Expected behavior Either no warning, or a way to set particular environment variables to be ignored in this context.

Screenshots image

Extension Version v0.25.3

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 33
  • Comments: 36 (5 by maintainers)

Most upvoted comments

Still seeing this issue FYI

definitely not fixed in the latest version.

I’m also experiencing this issue. It makes no sense to me that this warning is being issued. Either the extension can validate all context or if it cannot do some then don’t do any. Given that variables and secrets are viewable on the left I would imagine if can validate.

I think this issue need to be re-opened

@tylerclark:

Fixed in next release: #61 (comment)

I can’t see a commit which fixes this - even an unreleased one. Where did you see it was fixed?

Closing for fix in next release 💯

@epreston I had to uninstall/reinstall the extension for the secret names autocomplete to start working. Also, fixed the yellow underlines.

This resolved the issue for me, can’t believe I didn’t try this first myself 😑

I uninstalled, reinstalled and restarted VSCode and then the warnings went away.

i’m almost disabling the extension… problem showing in v.0.25.8 here too 😦

@Zageron that is supported by the extension:

CleanShot 2023-08-08 at 10 15 54@2x

Any possible fix?

Nothing, just login and open the checked out repository in vscode.

Edit: you need permissions to the repo, of course.

After further searching, appears to be a duplicate of both #61 and #47.