You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub Actions should execute OK even when run under containers.
Additional context
My suspicion is that we have a non-NixOS container (e.g. debian) that is trying to run to a NixOS executable (since the path to the symlink above does point to the Nix store).
Your suspicion sounds right. I'm not really sure how this works in a normal container: stanza outside of NixOS. I guess the GitHub Runner bind-mounts the necessary tools into the container?
In this case, it seems like it may be bind-mounting the Node.JS directory, but not the rest of its closure in the Nix store, so it fails to find shared libraries.
@thomasjm , you're absolutely right. Mounting /nix in the container does seem to solve the issue.
Now I'm wondering how we could fix this without having to change the workflow itself (since it could cause compatibility issues when using the workflow on non-NixOS runners).
I think the issue stems from the dynamic library loader, having a hard-coded path to the loader in the Nix store.
Probably not just the loader, but potentially all runtime dependencies of the chosen Node.js.
I think the right solution would be to configure GitHub runners on NixOS to mount the runtime closure of Node.js (not the full /nix dir, as that seems like too much) using the instructions here:
tl;dr from the docs: it looks like we need to set the ACTIONS_RUNNER_CONTAINER_HOOKS environment variable for the runner to point to an index.js where we define a prepare_job script, and the script should define jobContainer.systemMountVolumes to mount the paths we need.
Describe the bug
Jobs fail when using a
container:
declaration in GitHub workflows, using a non-NixOS image.The container is well built and run, but the all the GitHub Actions run inside it will crash with:
Adding a rudimentary log step reveals that the node executable is there:
Steps To Reproduce
Steps to reproduce the behavior:
services.github-runners
.Expected behavior
GitHub Actions should execute OK even when run under containers.
Additional context
My suspicion is that we have a non-NixOS container (e.g.
debian
) that is trying to run to a NixOS executable (since the path to the symlink above does point to the Nix store).Notify maintainers
@veehaitch , @thomasjm
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Will fill it later, since I don't have access to the runner at this moment.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: