Use sonarqube server scan for private repo

We are using community edition of sonarqube server. We are trying to setup github action on pull request.
I have some questions regarding.
Community edition can be used for private repo or we need a paid version?
If so is there any documentation for the same?

Community edition can be used for private repos, no problem! There should be a tutorial in the SonarQube UI when you create project for how to run the analysis.

@Colin
Thanks for response. I was able to setup the server and run the analysis.
i have one more question. Is there a way i can check which branch has failed the code quality check or on which branch the new code is pushed on sonarqube server?

Community Edition only supports analysis of one branch (your default branch). Branch & Pull Request Analysis is available starting in Developer Edition ($).