The first article explained the background of the solution and how the GitHub Repository is needed, we take the ARM template out of Logic Apps and authorize the Service Principal and GitHub’s Action to make the changes to Azure. Previous article focuses on how you parameterize the ARM template of Logic Apps. This post will tell how to create a CI/CD pipeline in yml and authorize another Azure resource to call Logic Apps.

5. Create a pipeline to install Logic Apps in environment N

In GitHub, go to the “Actions” tab and select “New workflow”, then select “Simple workflow” under “Configure”

Clear the page and replace the yml with the one below
# This is a basic workflow to help you get started with Actions

name: Deploy Test Environment
# Controls when the workflow will run

on:
  # Allows you to run this workflow manually from the Actions tab

  workflow_dispatch:

permissions:

  id-token: write

  contents: read

# A workflow run is made up of one or more jobs that can run sequentially or in parallel

jobs:

  # This workflow contains a single job called "build"

  build:

    # The type of runner that the job will run on

    runs-on: ubuntu-latest

    environment: test

    # Steps represent a sequence of tasks that will be executed as part of the job

    steps:

      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

      - uses: actions/checkout@v3

      # Runs a single command using the runners shell

      - name: Azure Login

        uses: azure/[email protected]

        with:

          client-id: ${{ secrets.AZURE_CLIENT_ID }}

          tenant-id: ${{ secrets.AZURE_TENANT_ID }}

          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

      - name: ARM Action

        run:  az deployment group create --name lapp-euw-logicappname-t --resource-group ${{ secrets.RG_NAME }} --template-file ${{ github.workspace }}/template.json --parameters ${{ github.workspace }}/parameters-test.json

The page should look like the image below. Name the pipeline, yml file and make sure you call the correct parameter file.

Press “Commit changes” enter comments and press “Commit changes” again.

Next, you can test the run by selecting “Actions”, then the desired workflow and its “Run workflow” menu “Run workflow”

You can edit the yml file directly by pressing the name of the yml file below the workflow name, which is covered by the red-bordered box in the image above.

Don’t forget to go check the Logic App Designer that everything is ok after running the pipeline

Please test your stuff alway in test

Post series

  1. Cross-technology deployment automation from GitHub to Dataverse
  2. Parameterize Logic Apps with Dataverse connector for GitHub pipeline
  3. Create GitHub CI/CD pipeline for install Logic Apps with Dataverse connector