Hi,
I’m having two questions, I have a bit of trouble when setting up a self-hosted runner.
- Is it possible that
act_runner
on windows does not support composite actions yet? My YAML looks like this:
My current yaml file looks a bit like
name: Build, test and deploy
on: [push]
jobs:
"Build, test and deploy":
strategy:
fail-fast: false
runs-on: windows-2022
defaults:
run:
shell: powershell
steps:
- name: Identify trigger
run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.5.1"
and this is hosted on a Windows 10 machine. I’m not really getting the poetry action to run properly though - looking into the actions’ repo, I’m seeing that this part is used as a “composite action”:
I see in the debug logs:
[...]
[Build, test and deploy/Build, test and deploy] [DEBUG] expression 'format('pip install poetry=={0}
', inputs.poetry-version)' evaluated to '%!t(string=pip install poetry==1.5.1
)'
[Build, test and deploy/Build, test and deploy] [DEBUG] Wrote command
pip install poetry==1.5.1
to 'workflow/3-composite-1.sh'
[Build, test and deploy/Build, test and deploy] [DEBUG] Failed to setup Pty Unsupported
| /bin/bash: C:/Users/xxx/.cache/act/7e9028cfc1cb68ec/act/workflow/3-composite-1.sh: No such file or directory
[Build, test and deploy/Build, test and deploy] ❌ Failure - Main pip install poetry==1.5.1
[...]
So it looks like the action tries to run bash which is not installed on Windows. The action however claims to be compatible with it - my guess is that I don’t really understand composite actions or that there is something going on with act_runner
trying to run on WSL which I am not realizing.
Can someone enlighten me a bit on this?
- I kinda circumvented that for now by just removing these steps and just manually installing the things that I need.
What I find more annoying though is that I don’t see the response in the fields on my Gitea webpage. I had configured the ‘standard labels’ (Ubuntu) yesterday and there I got some response back. Interestingly, the ‘Set up job’ point has some content. Anyone an idea what the reason could be?
Interestingly, if I remove
defaults:
run:
shell: powershell
from my config, I get my output back on the webpage, however then already the first real action is failing.
[...]
[Build, test and deploy/Build, test and deploy] [DEBUG] Wrote command
echo "🎉 The job was automatically triggered by a push event."
to 'workflow/0'
[Build, test and deploy/Build, test and deploy] [DEBUG] Failed to setup Pty Unsupported
| /bin/bash: C:/Users/xxx/.cache/act/df2ba9axxxf/act/workflow/0: No such file or directory
[...]
First of all, it seems like /bin/bash
is called again, which makes not much sense for Windows. I had expected that act_runner would by default fall back to pwsh but that’s not the case. The Failed to setup
comment is a bit puzzling - but setting up powershell as the shell to use is apparently also not the answer, or it is and Gitea does not handle this cleanly. So any heads-up here would be appreciated.
And yes, Windows is an 80%-hard requirement for this task for now.