Others already developed the actions to setup a SLURM cluster: https://github.com/koesterlab/setup-slurm-action