You can use a service principal, but to do that, you need to pass environment variables to the pulumi CLI. Azure CLI itself doesn't support that.
However, if you're doing GHA, I'd recommend using OIDC instead, it's really easy to setup, and means you don't need to use static credentials (it uses a service principal under the hood).