Replies: 2 comments
-
Here is a rudimentary example of a custom transformer that successfully converts a rudimentary devops yaml file with a couple Power Platform Build Tools tasks to a github yaml file that uses GitHub Actions for Power Platform. power-platform.rb transform "PowerPlatformToolInstaller@2" do |item|
{
"uses" => "microsoft/powerplatform-actions/actions-install@v1"
}
end
transform "PowerPlatformWhoAmi@2" do |item|
secretPrefix = "${{secrets." + item["PowerPlatformSPN"].upcase.sub('-','_')
{
"uses" => "microsoft/powerplatform-actions/who-am-i@v1",
"with" => {
"environment-url" => '${{secrets.ENVIRONMENT_URL}}',
"tenant-id" => secretPrefix + "_TENANT_ID}}",
"app-id" => secretPrefix + "_APP_ID}}",
"client-secret" => secretPrefix + "_CLIENT_SECRET}}"
}
}
end source.yml trigger: none
pool:
vmImage: ubuntu-latest
steps:
- task: PowerPlatformToolInstaller@2
displayName: Install Power Platform Build Tools
inputs:
DefaultVersion: true
- task: PowerPlatformWhoAmi@2
displayName: Call WhoAmI
inputs:
authenticationType: PowerPlatformSPN
PowerPlatformSPN: pipelines-spn
Environment: "$(BuildTools.EnvironmentUrl)" converted.yml name: devkeydet-dev/hello-world
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- name: Install Power Platform Build Tools
uses: microsoft/powerplatform-actions/actions-install@v1
- name: Call WhoAmI
uses: microsoft/powerplatform-actions/who-am-i@v1
with:
environment-url: "${{secrets.ENVIRONMENT_URL}}"
tenant-id: "${{secrets.PIPELINES_SPN_TENANT_ID}}"
app-id: "${{secrets.PIPELINES_SPN_APP_ID}}"
client-secret: "${{secrets.PIPELINES_SPN_CLIENT_SECRET}}" |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've also placed the sample https://github.com/devkeydet/migrate-powerplatform-build-tools-to-actions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
GitHub has GitHub Actions Importer
https://docs.github.com/en/actions/migrating-to-github-actions/automated-migrations/migrating-from-azure-devops-with-github-actions-importer
Would be nice if actions importer had more seamless migration from tasks to actions out of the box.
If not a collaboration between you and the GitHub Actions Importer team, it would be nice if you provided custom transformers people can use (or start with) so everyone doesn't have to build their own custom transformer to migrate.
https://github.com/actions/importer-labs/blob/main/azure_devops/5-custom-transformers.md
If the answer is no, is anyone in the community aware of custom transformers that have already been built to convert Power Platform Build Tools tasks to GitHub Actions for Power Platform?
Beta Was this translation helpful? Give feedback.
All reactions