This repository is a example how to work in collaboration with Power BI Projects using Git and GitHub Workflow resolving conflicts and building a parallel project sample. It demonstrates the use of a CI/CD scenario for Microsoft Power BI PRO projects by utilizing fabric-cli and GitHub Actions.
- Video demo of this repo: https://youtu.be/sgVqrOUgXro
- How to get Service Principal: https://youtu.be/IFp1Aingnmw
- Learn Git and GitHub for MS Fabric and Power BI: https://youtu.be/wFimCGpndOc
- Fork this repo
- Create a copy of
.env.exampleand rename to.envand fill with the SPN secrets - Configure the same SPN secrets on GitHub Actions if you want CD
| Name | Value |
|---|---|
| FABRIC_CLIENT_ID | Your Service Principal Client ID from Entra App ID |
| FABRIC_CLIENT_SECRET | Your Service Principal Secret from Entra App ID |
| FABRIC_TENANT_ID | Your Tenant ID |
If you run locally, in the first time install the requirements with:
$ pip install -r requirements.txt - Configure the file
config.jsonwith ids by branch.- The adminUPNs are the Object ID of the Entra User Principal Name.
- The Power BI Projects are saved in the
srcfolder with the extensions*.Reportand*.SemanticModel. - Deploying new versions is done on the
devbranch. - On every Pull Request to
develop, the GitHub Actions pipeline called.github\workflows\bpa.ymlis triggered, running the best practices analysis pipeline. This process utilizes community tools such as Tabular Editor and PBI-Inspector. If approved and merged the pipeline.github\workflows\deploy.ymlwill deploy to the workspace*-DEVworkspace with the name and data source specified inconfig.json. - Once the project is approved, a pull request is created for the
mainbranch, where the pipeline will deploy the version to the workspace*-PRDworkspace following the sameconfig.json.
- If you would like to help fund or sponsor the project, you can do via 💗 GitHub Sponsors or yet via YouTube.
- This is just one suggested approach in a world of countless possibilities and diverse structures.
You can and should use this repository as inspiration and a technical foundation to build more sophisticated and robust pipelines if needed for your application. If you are a dev and discover issues or alternative ways, submit your pull requests to apreciation if you wish to contribute with code for the project. - Other ways to contribute are by helping people out with support on our forums or in our community. You can access them on the below links.