Manage and promote Power BI .pbix reports across Dev → Test → UAT → Prod workspaces via GitHub Actions.
powerbi analytics/
├── .github/workflows/
│ └── promote-report.yml # Manual promotion pipeline
├── reports/
│ └── <report-folder>/
│ ├── <report>.pbix # The report file (committed to git)
│ └── report.config.json # Report metadata + workspace IDs per env
├── environments/
│ ├── dev.json
│ ├── test.json
│ ├── uat.json
│ └── prod.json # Workspace IDs per environment
├── scripts/
│ ├── deploy.ps1 # Deployment logic (PowerShell)
│ └── list-reports.ps1 # List reports in a workspace
└── .gitignore
In Azure Portal → App Registrations → New registration:
- Note the Application (client) ID and Tenant ID
- Under Certificates & secrets, create a new client secret
In Power BI Admin Portal → Tenant settings:
- Enable "Allow service principals to use Power BI APIs"
- Add your service principal's security group
Add the service principal as a Member to each workspace (Dev, Test, UAT, Prod).
Edit each file in /environments/ with your actual workspace IDs:
{
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"workspaceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"workspaceName": "PowerBI-DEV"
}In your GitHub repo → Settings → Secrets and variables → Actions:
| Secret name | Value |
|---|---|
PBI_CLIENT_ID |
Service Principal Application (client) ID |
PBI_CLIENT_SECRET |
Service Principal client secret |
In Settings → Environments, create four environments: dev, test, uat, prod.
For uat and prod, add Required reviewers — those people will receive an approval request before any deployment runs.
-
Create a folder under
/reports/:reports/ └── my-new-report/ ├── my-new-report.pbix └── report.config.json -
Copy the template
report.config.jsonand fill in the details:{ "reportName": "My New Report", "pbixFile": "my-new-report.pbix", "owner": "your-team@company.com", "datasetName": "My Dataset", "environments": { "dev": { "reportId": "", "datasetId": "" }, "test": { "reportId": "", "datasetId": "" }, "uat": { "reportId": "", "datasetId": "" }, "prod": { "reportId": "", "datasetId": "" } } } -
Add the folder name to the
report_folderoptions in.github/workflows/promote-report.yml:options: - sample-report - my-new-report # <-- add here
-
Commit and push.
- Go to GitHub → Actions → Promote Power BI Report
- Click Run workflow
- Select:
- Report folder — the report you want to deploy
- Target environment —
dev,test,uat, orprod
- Click Run workflow
For uat and prod, the pipeline will pause and send an approval notification before deploying.
After a successful deployment, report.config.json is automatically updated with the new report and dataset IDs for that environment.
# Deploy a report to dev
.\scripts\deploy.ps1 `
-ReportFolder "my-new-report" `
-Environment "dev" `
-ClientId "your-client-id" `
-ClientSecret "your-client-secret"
# List all reports in prod
.\scripts\list-reports.ps1 `
-Environment "prod" `
-ClientId "your-client-id" `
-ClientSecret "your-client-secret"- Fill in environments/*.json — add your real tenantId and workspaceId for each workspace
- Create scout-model.pbix — follow the Option 1 steps (Save As from your existing Scout .pbix, delete all pages)
- Add GitHub Secrets — PBI_CLIENT_ID, PBI_CLIENT_SECRET, and DB credentials per env
- Push everything to GitHub — then the pipelines will be ready to run