This is the script that I use to provision Github's self hosted runners for my usecase. You may have to make modifications to it to fit your usecase. The script expects to run as root and expects a non-root "administrator" account for the system.
The goal of the provisioning is to bring this setup as close to the real thing as possible. You may have to make some modifications to your github actions config to make the most out of this. Most important of which would be the removal of setup buildx action.