`/usr/bin/bash` missing on Ubuntu 22.04 images
etu opened this issue · comments
I run CI of my nixos config using ubuntu-latest
images here on GitHub. Yesterday I had a job running and it was fine, but tonight my overnight job failed.
It failed with the following error:
Cachix: installing
/usr/bin/bash -c nix-env --quiet -j8 -iA cachix -f https://cachix.org/api/v1/install
warning: unknown setting 'experimental-features'
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
Error: Action failed with error: Error: The process '/usr/bin/bash' failed with exit code 1
Failed build: https://github.com/etu/nixconfig/actions/runs/3635609278/jobs/6134858130
Successful build yesterday: https://github.com/etu/nixconfig/actions/runs/3629375898/jobs/6121504673
So I thought that was a bit curious. So I looked at the environment because I have my nix version pinned and all imported actions are pinned to specific versions.
So yesterday I had a successful run with cachix-action@v12 with the following environment:
Current runner version: '2.299.1'
Operating System
Ubuntu
20.04.5
LTS
Runner Image
Image: ubuntu-20.04
Version: 20221125.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu20/20221125.1/images/linux/Ubuntu2004-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu20%2F20221125.1
And tonight's failed run with the following environment:
Current runner version: '2.299.1'
Operating System
Ubuntu
22.04.1
LTS
Runner Image
Image: ubuntu-22.04
Version: 20221204.2
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20221204.2/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20221204.2
To me this place looks like a place where it could go wrong:
Line 24 in 6a9a34c
/usr/bin/bash
if it doesn't exist? Or... maybe they dropped it? Maybe it should refer to sh
or ash
instead?We are experiencing this issue as well with our CI workflows installing nix on the latest ubuntu 22.04 runners
Unless there's any specific shell syntax in there like a pipe or redirect, we should be able to exec
just the installCommand
without a shell. The default install command looks like it doesn't need a shell, but I'm not sure what core.getInput('installCommand')
could be.
This is a dupe of cachix/install-nix-action#148