The following line is trying to pipe the entire output of import and print commands into the GITHUB_ENV variable:
|
echo "library_version=$(python -c "from ${{ inputs.library-namespace }} import __version__; print(__version__)")" >> $GITHUB_ENV |
If on import the package outputs anything, it breaks the action as it all gets merged into the GITHUB_ENV var. I believe that is the reason for this failure:
https://github.com/ansys/pyfluent/actions/runs/5114660367/jobs/9195134134?pr=1651
Due to:

I get bash: $GITHUB_ENV: ambiguous redirect if I try piping the entire output into a variable too, not sure how/why it works on the github runners (is it not bash?).
I believe we only want the output from the print(__version__) command piped into the GITHUB_ENV variable, in which case my suggestion would be to change line 92 to:
echo "library_version=$(python -c "from ${{ inputs.library-namespace }} import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_ENV so that we only pipe the last line of the output, which should include only the output from the print(version) command we want. Also that extra print(); to make sure output doesn't include any previous std output that did not end with a line break (shouldn't happen but probably better be safe).
An example commit where this was fixed and then the action Build Documentation which had previously failed for the same reason (and does not use build-wheelhouse) passed: ansys/pyfluent@c65473d
The following line is trying to pipe the entire output of
importandprintcommands into theGITHUB_ENVvariable:actions/build-wheelhouse/action.yml
Line 92 in a78b246
If on

importthe package outputs anything, it breaks the action as it all gets merged into theGITHUB_ENVvar. I believe that is the reason for this failure:https://github.com/ansys/pyfluent/actions/runs/5114660367/jobs/9195134134?pr=1651
Due to:
I get
bash: $GITHUB_ENV: ambiguous redirectif I try piping the entire output into a variable too, not sure how/why it works on the github runners (is it not bash?).I believe we only want the output from the
print(__version__)command piped into theGITHUB_ENVvariable, in which case my suggestion would be to change line 92 to:echo "library_version=$(python -c "from ${{ inputs.library-namespace }} import __version__; print(); print(__version__)" | tail -1)" >> $GITHUB_ENVso that we only pipe the last line of the output, which should include only the output from theprint(version)command we want. Also that extraprint();to make sure output doesn't include any previous std output that did not end with a line break (shouldn't happen but probably better be safe).An example commit where this was fixed and then the action
Build Documentationwhich had previously failed for the same reason (and does not usebuild-wheelhouse) passed: ansys/pyfluent@c65473d