-
Notifications
You must be signed in to change notification settings - Fork 1k
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
unable to inject shell to composite action #835
Comments
Yea. this is annoying, please fix this. |
Any workaround? Right now, the only one I can think of is, duplicating all my actions steps and have |
FYI, rather than duplicating steps, I ended up sym-linking OS-specific shells to a known location, and changed my steps to specify that new location as - name: Create bash-or-msys2
shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
powershell New-Item -ItemType SymbolicLink \
-Path "D:/a/_temp/setup-msys2/bash-or-msys2.cmd" \
-Target "D:/a/_temp/setup-msys2/msys2.cmd"
else
sudo ln -sf $(which bash) /usr/local/bin/bash-or-msys2
fi
...
- name: Upgrade ASDF to the Latest Version
shell: bash-or-msys2 {0}
run: |
if [[ "${{ inputs.asdf-version }}" != "latest" ]]; then
echo ::group::Installing ASDF ${{ inputs.asdf-version }}
ros install asdf/${{ inputs.asdf-version }}
else
echo ::group::Installing latest ASDF
ros install asdf
fi
echo ::endgroup:: Not ideal, but not as ugly as duplicating each and every step. |
Now that GitHub Actions supports - name: create bash-or-msys2 (for bash)
shell: bash
if: inputs.shell == 'bash'
run: sudo ln -sf $(which bash) /usr/local/bin/bash-or-msys2
- name: create bash-or-msys2 (for msys2)
shell: bash
if: inputs.shell == 'msys2 {0}'
run: |
if [[ ! -f "D:/a/_temp/setup-msys2/bash-or-msys2.cmd" ]]; then
powershell New-Item -ItemType SymbolicLink -Path "D:/a/_temp/setup-msys2/bash-or-msys2.cmd" -Target "D:/a/_temp/setup-msys2/msys2.cmd"
fi |
1 year? |
@tfgstudios this is how software is developed nowadays... |
Weirdly this feature is explicitly documented in an ADR as if it should work seamlessly: https://github.com/actions/runner/blob/e7d74da1600b1aa8ac8db18cc4c76ef44a82e689/docs/adrs/0549-composite-run-steps.md#shell-and-working-directory |
@ethanchewy since you wrote the docs above maybe you can comment on the status here? |
Hey everyone, we are reproducing this issue and we will notify you as soon as it is fixed 😊 |
We are still experiencing this issue using ubuntu-latest runners.
Workflow
|
Also experiencing this. |
Describe the bug
Unable to pass the shell via input parameter to the composite action.
To Reproduce
Steps to reproduce the behavior:
where
(Line: 25, Col: 14)
corresponds to the last line of the action from step 1. I.e.shell: ${{ inputs.shell}}
Expected behavior
The action works fine and uses the shell passed in as input argument to the action.
Runner Version and Platform
windows-latest
The text was updated successfully, but these errors were encountered: