github-workflows-kt
github-workflows-kt copied to clipboard
[Bug] `Contexts.env` result misses the `env.` prefix
Component
- [x] github-workflows-kt (library with the DSL)
- [ ] bindings server (https://bindings.krzeminski.it)
- [ ] I don't know
Action
val FOO by Contexts.env
and then using it
Expected
env.FOO is used
Actual
FOO is used
Version
3.4.0
There are actually 3 things wrong here:
-
Contexts.envwasn't meant to be used with GitHub Actionsenvcontext, but instead as a type-safe way to refer to the env vars from shell. We don't have support forenvcontext, and we probably should underContexts.env. For type-safe referring from shell, we should have some other mechanism. - Even with the assumption that
Contexts.envis for shell, the usage shown in the tests: https://github.com/typesafegithub/github-workflows-kt/blob/8005a2e446b7c80cabb68ea9022b3fb2d87ef973/.github/workflows/end-to-end-tests.main.kts#L75-L77 produces this:
- it should be without the dollar sign.env: $GREETINGS: World - The tests don't have any assertion on the correct interpolation e.g. here: https://github.com/typesafegithub/github-workflows-kt/blob/8005a2e446b7c80cabb68ea9022b3fb2d87ef973/.github/workflows/end-to-end-tests.main.kts#L191
Oh, yeah, that's quite confusing then right now.