-
Notifications
You must be signed in to change notification settings - Fork 767
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
Support shell environment variables in more fields #739
Comments
Hi @aep-sunlife, |
Hi @aep-sunlife, To ensure that the JAVA_VERSION environment variable is properly set and used across different steps in the workflow, you need to:
By appending to Here’s how you can modify your workflow:
|
Hi @aep-sunlife, Could you kindly confirm if the feedback provided has resolved your issue? |
Hi @aep-sunlife, |
Description:
Fields like
java-version
aren't processing shell environment variables. Consequently, establishing a primary source of truth for version numbers involves quite elaborate boilerplate, especially when reusing version numbers across multiple workflows.Task version:
4
Platform:
Tested on Ubuntu, likely happens on the others as well.
Runner type:
Repro steps:
Expected behavior:
java-version
populates with a value of17
, based on aJAVA_VERSION='17'
command in a reusabletools.sh
script.Actual behavior:
setup-java treats
$JAVA_VERSION
as a string literal.Workaround
tools.txt:
build.yaml:
A rube goldberg involving expressions and outputs can succeed, but it results in code that's harder to read and write.
Ideally, the field updates to account for shell variables.
This needs to be done in a platform agnostic way. We can reasonably support at least POSIX shell syntax, Command Prompt, and PowerShell. We may constrain the POSIX variable expansion syntax to at most
$VAR
and${VAR}
, with no default values or substitutions, for simplicity.The text was updated successfully, but these errors were encountered: