actions / runner-container-hooks

Runner Container Hooks for GitHub Actions
MIT License
63 stars 41 forks source link

Mount /github/workflow to docker action pods #137

Closed katarzynainit closed 4 months ago

katarzynainit commented 4 months ago

/github/workflow is set via env GITHUB_EVENT_PATH also in docker actions. Such path is mount in container jobs pods, and should be(?) mount in similar fashion in other child pods (in this case docker action pods), especially that some docker actions from marketplace, use this path.

Having it inconsistent for container job pod and for docker action pod, makes it impossible to use with ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE and mount via extension, which is shared for both - it will work for docker action pods, but will fail for container job pod (duplicate mount point).

Adding it as default mount seems the only option to be able to properly utilize this ENV (and events in general).

luka5 commented 4 months ago

Thanks for that PR. Trying to run the docker container action super-linter action in v5 with the actions runner controller in container mode kubernetes lead me here. It fails with /action/lib/linter.sh: line 550: /github/workflow/event.json: No such file or directory. I expect this fix to resolve that issue.

luka5 commented 4 months ago

What do you think @nikola-jokic , does this sound like a reasonable change? Is there a reason, why it is different for jobContainer right now?