Closed miigotu closed 10 months ago
Any idea why? Seems like this is what should be happening anyways, right?
Any idea why? Seems like this is what should be happening anyways, right?
It just calls the script like ./main.sh, and even though the file is executable outside of the runner, when it is copied into the runner it ends up not executable. I'm not sure why, but calling it with bash directly fixes it
Do you think we'd be able to add a test to make sure we don't break executability again? Does it only really happen locally?
I'll test it a bit when I get back to a PC. I'm not sure if it's only local or not right now, but I know previously I had to disable testing on windows with CI.
I have a linux and macbook available if you want me to try something out on those :relaxed:
So, heres the issue. netkos/act runs github actions locally, insode a docker container. It copies the action into the runner with docker cp, which changes the file permissions to 644
If i run my workflow on github with this PR change, using bash $GUTHUB_WORKSPACE/main.sh, intall_poetry activates inside that base terminal and then is not activated after the main.sh completes and lets the bash terminal close.
So, thats obviously a problem (command poetry not found)
I'm going to close this and try to find another way. I think a chmod +755 $GUTHUB_WORKSPACE/main.sh && $GUTHUB_WORKSPACE/main.sh
would work both ways, but thats really ugly.
I'm not sure if this fixes any error on windows when using github actions directly, but this fixes the following error when using netkos/act
This error happens with bash as default run.
/var/run/act/workflow/2-composite-0.sh
contains$GITHUB_ACTIONS_PATH/main.sh
Maybe this should be done differently, but the script is not executable so the shebang doesnt work.