Available GitHub Actions for Microsoft Power Platform administration
This article provides information about GitHub Actions that are available to administer Microsoft Power Platform.
Configure credentials to use within your GitHub workflows
Many of the actions require you to connect to a Microsoft Dataverse environment. You can add service principal or user credentials as secrets in your GitHub repository and then use them in the workflow.
For details about how to set up secrets in GitHub, go to Using encrypted secrets in a workflow.
For details about how to set up service principal authentication for Microsoft Power Platform, go to Configure service connections using a service principal. After it's configured properly, you can call the service principal from within your action scripts.
Define the following parameters within your GitHub Actions script as environment variables:
- Application ID:
WF_APPLICATION_ID:<your application id>
- Tenant ID:
WF_TENANT_ID:<your tenant id>
The client secret will be stored as a GitHub secret, as described in Encrypted secrets, and will be referenced from within the action script by using a parameter like
client secret: ${{secrets.CLIENT_SECRET_GITHUB_ACTIONS}}
.
Administrative tasks
The available administrative tasks are explained below.
Create an environment
Parameter | Description |
---|---|
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
name | The name of the environment that you're going to create. |
region | The name of the region where your environment will be created. The default value is unitedstates . |
type | The type of environment (Trial, Sandbox, Production, SubscriptionBasedTrial). More information: Trial environments |
currency | The currency to use for the environment. The default value is USD . |
language | The language to use for the environment. The default value is English . |
templates | The templates that need to be deployed to the environment. These are passed as comma-separated values. |
domain | The domain name of the environment URL. For example, https://{contoso}0.crm.dynamics.com |
The output will be the URL of the new environment.
Copy an environment
Parameter | Description |
---|---|
source-url | The source URL of the environment to copy. For example, https://source-env.crm.dynamics.com |
target-url | The target URL of the environment to copy. For example, https://target-copy-env.crm.dynamics.com |
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
Back up an environment
Parameter | Description |
---|---|
environment-url | The URL of the environment that needs to be backed up. For example, https://env-to-backup.crm.dynamics.com |
backup-label | A meaningful name to use as a label for the backup of the environment. |
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
Restore an environment from a backup
Parameter | Description |
---|---|
source-url | The source URL of the environment to restore. For example, https://env-backup-source.crm.dynamics.com |
target-url | The target URL of the environment to be restored to. For example, https://env-target-restore.crm.dynamics.com |
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
Reset an environment
Parameter | Description |
---|---|
environment-url | The URL of the environment that needs to be reset. For Example, https://env-to-reset.crm.dynamics.com |
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
Delete an environment
Parameter | Description |
---|---|
environment-url | The URL of the environment that needs to be deleted. For example, https://env-to-delete.crm.dynamics.com |
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
Helper tasks
The available helper tasks are described below.
WhoAmI
Verifies the service connection by connecting to the service and sending a WhoAmI
[SDK/Web API] request. This task can be useful to include early in your DevOps pipeline, to verify connectivity before processing begins.
Parameter | Description |
---|---|
environment-url | The URL for the environment you're connecting to. |
user-name | The username of the account you're using to connect with. |
password-secret | The password for user-name. GitHub passwords are defined in Settings under Secrets. You can't retrieve a secret after it has been defined and saved. |
app-id | The application ID to authenticate with. This parameter is required when authenticating with service principal credentials. |
client-secret | The client secret used to authenticate the GitHub pipeline. This parameter is required when authenticating with service principal credentials. |
tenant-id | The tenant ID when authenticating with app-id and client-secret . |
Build and release pipeline authoring
To learn about creating multiple-action workflows and pipelines through hands-on authoring by using GitHub Actions for Microsoft Power Platform, complete the GitHub Actions for Microsoft Power Platform labs.
More information: About GitHub Actions