Skip to content

chantifiedlens/deploy-microsoft-fabric-items

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Microsoft Fabric workspace items with fabric-cicd

This composite GitHub Action performs the following steps to deploy Microsoft Fabric items to a workspace. By deploying metadata about the items that are stored within a Git repository that has been connected to a Microsoft Fabric workspace with Microsoft Fabric Git integration.

For example, suppose your workspace contains a Power BI report and a semantic model, and you've configured Microsoft Fabric Git integration with GitHub. The metadata for these items is stored in your GitHub repository. You can then set up a GitHub Actions workflow in that same repository and use this GitHub Action to deploy these items to other Microsoft Fabric workspaces.

This GitHub Action utilizes the fabric-cicd Python library. To manage expectations, ideally you need some fabric-cicd knowledge to make the most out of this GitHub Action. Especially when it comes to utilizing fabric-cicd parameterization (see the notes section for further details).

The steps performed are as below:

  • Checks out the repository
  • Sets up Python
  • Installs the fabric-cicd Python package
  • Authenticates to Azure using a Service Principal via Az PowerShell
  • Runs a Python deployment script (either auth_spn_deploy_all_workspace.py if items-in-scope input has no value or auth_spn_deploy_fabric_items.py or if items are specified)

Inputs

  • azure-client-id (required) - Azure Service Principal client id (can be passed from encrypted secrets).
  • azure-client-secret (required) - Azure Service Principal client secret (can be passed from encrypted secrets).
  • azure-tenant-id (required) - Azure tenant id (can be passed from encrypted secrets).
  • workspace-id (required) - Workspace id to pass to the script (can also be provided via repo variables).
  • environment-name (optional) - Environment string (default: Test,can also be provided via repo variables).
  • fabric-cicd-version (optional) - Specific version of fabric-cicd library (default: ``,can also be provided via repo variables). Latest version installed when not specified.
  • repository-directory (optional) - Path to repository directory containing workspace items (default: ./workspace, can also be provided via repo variables).
  • items-in-scope (optional) - ItemsInScope argument for the script. When left blank all supported items are deployed to the workspace specified (can also be provided via repo variables).

Notes:

  • The action expects Azure credentials as inputs. For security, pass those inputs from your repository or organization secrets when you call the action (example below).
  • Deployment is based on the fabric-cicd Python library.
  • Only the metadata is deployed, not the data within items themselves.
  • You can utilize fabric-cicd parameterization providing that the parameter.yml file is in your own repository.
  • Has been tested with latest versions of windows and ubuntu hosted runers.
  • Additional examples can be found in the GH-deploy-microsoft-fabric-items-examples GitHub repository

Usage

Add this action to a job step in your workflow. Example:

jobs:
  deploy:
    runs-on: windows-latest
    steps:
      - name: Deploy Fabric items
        uses: ChantifiedLens/deploy-microsoft-fabric-items@v1.2.0
        with:
          azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
          azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
          azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          workspace-id: ${{ vars.TestWorkspace }}
          environment-name: 'Test'
          fabric-cicd-version: '0.1.33'
          repository-directory: './workspace'
          items-in-scope: ${{ vars.ItemsInScope }}

About

Composite action to deploy Microsoft Fabric workspace items using fabric-cicd and Az PowerShell authentication

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages