I am attempting to automate the building and publishing of a snap to the Snap store in the ubuntu-latest VM in GitHub Actions.
Snapcraft relies on multipass for building snaps. Invoking multipass fails on the ubuntu-latest VM on GitHub Actions with the following errors:
$ sudo multipass list
list failed: cannot connect to the multipass socket
Please ensure multipassd is running and '/run/multipass_socket' is accessible
$ snapcraft
Launching a VM.
launch failed: cannot connect to the multipass socket
Please ensure multipassd is running and '/run/multipass_socket' is accessible
I have attempted the following remediation:
- Adding
sudo chown root:root / to my workflow
- Ensuring my VM user is in sudo group with
sudo usermod -aG sudo $USER
- Manually starting multipassd with
sudo snap start multipass before invoked
- Ensuring permissions are set properly the socket
sudo chown $USER:$USER /run/multipass_socket but this fails without a sudo touch /run/multipass_socket because it can never find /run/multipass_socket
To duplicate:
- Create a new GitHub repository on an account with GitHub Actions enabled.
- Create a new workflow.
- Copy and paste GitHub Actions workflow from here.
- Run workflow.
Use case:
Ubuntu is the primary Linux distro on GitHub actions and comes with snapd pre-installed. Snaps are an excellent way to handle dependencies when building with GitHub Actions. It would be useful to be able to build snaps on the same platform. GitHub Actions support would be particularly useful for pushing new releases from GitHub to the Snap store.

I am attempting to automate the building and publishing of a snap to the Snap store in the ubuntu-latest VM in GitHub Actions.
Snapcraft relies on multipass for building snaps. Invoking multipass fails on the ubuntu-latest VM on GitHub Actions with the following errors:
I have attempted the following remediation:
sudo chown root:root /to my workflowsudo usermod -aG sudo $USERsudo snap start multipassbefore invokedsudo chown $USER:$USER /run/multipass_socketbut this fails without asudo touch /run/multipass_socketbecause it can never find/run/multipass_socketTo duplicate:
Use case:
Ubuntu is the primary Linux distro on GitHub actions and comes with snapd pre-installed. Snaps are an excellent way to handle dependencies when building with GitHub Actions. It would be useful to be able to build snaps on the same platform. GitHub Actions support would be particularly useful for pushing new releases from GitHub to the Snap store.