Provide "docker run" options for the containers launched by the runner #79
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hey,
Not sure if this is already possible,
But I'm finding it very needed to be able to provide extra options for the containers that the runner launches, so I can, for example, add volumes to it.
-v /path/to/dir/:/path/to/dir
If this is already possible, please let me know!
I understand this is something that wouldn't be possible on GitHub Actions, but since we're self-hosting Gitea on our servers, having some extra flexibility on this would be very great!
Thank you very much!!
Due to missing container-options flag / config you currently have to add them into your workflow file
See second example with
container:
https://github.com/nektos/act/issues/1696#issuecomment-1483385747Not tested with act_runner, it works in act
Thanks. I didn't know this!
That should be enough for me, if it works!!
I'm giving it a try.
I see I cannot use
env.XYZ
like this:Which is OK - we can just hardcode the values.
However:
I was expecting
echo "$OUTPUT1"
(the 3rd line from the bottom) to printhello
, but it doesn't.Now - a few notes:
I run Gitea in Docker, with
docker.sock
mounted from the hostI understand
-v /var/run/act/workflow/:/var/run/act/workflow/
mounts the host's/var/run/act/workflow/
folder, so this is not a valid test.I saw the folder was created in the host, and contains all the Step files.
I deleted that folder.
I also tried without
-v /var/run/act/workflow/:/var/run/act/workflow/
.I see the folder wasn't created in the host, but
hello
isn't printed either.Not sure if the
act_runner
tries to add the volume itself, using the real folder or so.The thing is that since both Gitea and
act_runner
run on Docker, I'm not exactly sure how couldact_runner
make this work for$GITHUB_OUTPUT
.I see
needs
in your example, however that is not implemented (yet) in Gitea Actions and needs protocol changes..., the ones who implemented this in first place forget that (needs works in nektos/act)Please read my list of defects:
I'm still using my own GitHub Actions Simulator for gitea, which I posted in the initial gitea actions issue before this became reality
To be clear,
needs
works in Gitea Actions, what is not implemented isoutput
.Actually, not in the version I have right now. There have been a number of fixes since, also from issues I raised.
I was waiting for a new version of Gitea, but I've just realized that
act_runner
can be updated separately (of course, since I've downloaded a separate binary for it :-) !)I'll look into upgrading it now with the latest version.
Although, some fixes go on Gitea, like - https://github.com/go-gitea/gitea/pull/23789
I was refering to the
needs
context${{ needs.<id>.result }}
, because it has been empty.like this ?
Hey @seepine
I was thinking just something as simple as:
options: -v /root-path/:/root-path/ -v /var/run/act/workflow/:/var/run/act/workflow/
which seems to exist already, but there appears to be some caveats/limitations at the moment, based on the comments above.
I'd say we'll give it a bit of time while Gitea devs continue to implement what's missing, and make improvements, and then we can come back to this, to see what we can do to improve this scenario :-)