Did you test that with 4.x? Because when I did I got toooooonnnnnessss of errors. Godot changed path names on a lot of things - and there's no headless download binary, you have to use headless as a command option in the bash file settings.
But then again it was my first ever GitHub action :D
I'd be interested to know what works for you, especially making sure the caching works optionally as that is out of my perview