Skip to main content

3 posts tagged with "developer experience"

View All Tags

· 4 min read
Kartik Kanakasabesan
Daniel Laskewitz

Welcome to Day 21 of #30DaysOfLowCode!

Yesterday we talked about foundamentals of App Lifecycle Managament with Power Platform. Today we'll explore the topic of GitHub Actions and show you how can you connect to Power Platform environments with GitHub Actions.

What We'll Cover​

Empty Banner Placeholder

Basic GitHub Actions Concepts​

Before we get into details on the Power Platform GitHub actions, we need to understand some key terms of GitHub, that enable GitHub to do Continuous Integration/Continuous Delivery (CI/CD).

GitHub Workflow Concepts

  • GitHub actions are components to enable CI/CD of Power Platform Applications using GitHub Workflows.
  • GitHub Run : GitHub run is a term used when the workflow runs
  • GitHub Workflow : This is the actual CI/CD script that is used by GitHub and it consists of Jobs
  • GitHub Job : A Job is a composition of a GitHub Runner (container where the CI/CD script is run)
  • GitHub Steps : Step has a set of actions that accomplish an the overall outcome of the workflow (such as deploying to Power Platform)

The GitHub actions for Power Platform are available at the GitHub market place. The GitHub actions, provide the ability to import export solutions, deploying to different environments, provisioning and decommissioning an environments, and validate the solution when it is being imported into a target environment.

GitHub Runners​

Runners in GitHub are a type of machine where you need to run your GitHub job on. Runners can GitHub hosted or self-hosted. GitHub hosted runners are managed by GitHub and all you need to do is to use runs-on and GitHub will automatically allocate such a resource during the runtime of a CI/CD script.

Self-hosted Runners run on your identified resources such as VMs in the Azure Cloud or On-premises. This runners are configured and controlled based on your needs, as in you have more control on the kind of operating system version, pre-installed software tools that need to install for your CI/CD script to run.

Power Platform Actions on GitHub, support Windows and Linux images for both GitHub hosted and self-hosted runners.

How to connect to Power Platform environments using GitHub Actions?​

Power Platform Actions for GitHub have support for the following:

  • UserName/Password : Generic connection which uses username and password to authenticate to the Power Platform environments. Please do not enable MFAs this account otherwise your GitHub workflows will break
  • Service Principal and Client secret (Recommended) - This allows your workflow to authenticate to the Power Platform using a service principal identity with a client secret. This is an approach we generally recommend when deploying Power Platform applications at scale.

Use Environment Variables within GitHub workflow scripts when deploying Power Platform applications​

If you want to use the same workflow to deploy multiple Power Platform solution to either one environment or different environments. GitHub Workflows support environment variables. Example of GitHub environment variables

Once you have the environments in place you can then call these environment variables from within the actions Example of invoking environment variables from the action

Exercise​

Resources​

Campaign Banner