Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #40

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/export-and-branch-solution-MaxSievert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: export-and-branch-solution
# Export solution from DEV environment
# unpack it and prepare, commit and push a git branch with the changes

on:
workflow_dispatch:
inputs:
# Change this value
solution_name:
description: 'name of the solution to worked on from Power Platform'
required: true
default: ALMLab
#Do Not change these values
solution_exported_folder:
description: 'folder name for staging the exported solution *do not change*'
required: true
default: out/exported/
solution_folder:
description: 'staging the unpacked solution folder before check-in *do not change*'
required: true
default: out/solutions/
solution_target_folder:
description: 'folder name to be created and checked in *do not change*'
required: true
default: solutions/
env:
#edit your values here
ENVIRONMENT_URL: 'https://orgd946f96f.crm4.dynamics.com/'
CLIENT_ID: 'b110408e-7ec0-40c0-b592-997ace535e39'
TENANT_ID: 'f41f49a4-dd0f-4714-87fc-86da0b90c342'
permissions:
contents: write
jobs:
export-from-dev:
runs-on: windows-latest
# or you can say runs-on: ubuntu-latest
env:
RUNNER_DEBUG: 1

steps:
- uses: actions/checkout@v2
with:
lfs: true

- name: who-am-i action
uses: microsoft/powerplatform-actions/who-am-i@v0
with:
environment-url: ${{env.ENVIRONMENT_URL}}
app-id: ${{env.CLIENT_ID}}
client-secret: ${{ secrets.PowerPlatformSPN }}
tenant-id: ${{env.TENANT_ID}}


- name: export-solution action
uses: microsoft/powerplatform-actions/export-solution@v0
with:
environment-url: ${{env.ENVIRONMENT_URL}}
app-id: ${{env.CLIENT_ID}}
client-secret: ${{ secrets.PowerPlatformSPN }}
tenant-id: ${{env.TENANT_ID}}
solution-name: ${{ github.event.inputs.solution_name }}
solution-output-file: ${{ github.event.inputs.solution_exported_folder}}/${{ github.event.inputs.solution_name }}.zip

- name: unpack-solution action
uses: microsoft/powerplatform-actions/unpack-solution@v0
with:
solution-file: ${{ github.event.inputs.solution_exported_folder}}/${{ github.event.inputs.solution_name }}.zip
solution-folder: ${{ github.event.inputs.solution_folder}}/${{ github.event.inputs.solution_name }}
solution-type: 'Unmanaged'
overwrite-files: true

- name: branch-solution, prepare it for a PullRequest
uses: microsoft/powerplatform-actions/branch-solution@v0
with:
solution-folder: ${{ github.event.inputs.solution_folder}}/${{ github.event.inputs.solution_name }}
solution-target-folder: ${{ github.event.inputs.solution_target_folder}}/${{ github.event.inputs.solution_name }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty-commit: true
22 changes: 11 additions & 11 deletions .github/workflows/export-and-branch-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,31 @@ jobs:
- name: who-am-i action
uses: microsoft/powerplatform-actions/who-am-i@v0
with:
environment-url: 'https://user9-dev.crm.dynamics.com/'
user-name: 'user9@wrkdevops.onmicrosoft.com'
environment-url: 'https://orgd946f96f.crm4.dynamics.com/'
user-name: 'farid.kasambula@kmlabb.onmicrosoft.com'
password-secret: ${{ secrets.password }}

- name: export-solution action
uses: microsoft/powerplatform-actions/export-solution@v0
with:
environment-url: 'https://user9-dev.crm.dynamics.com/'
user-name: 'user9@wrkdevops.onmicrosoft.com'
password-secret: ${{ secrets.password }}
solution-name: ALMLab
solution-output-file: out/exported/ALMLab.zip
environment-url: 'https://orgd946f96f.crm4.dynamics.com/'
user-name: 'farid.kasambula@kmlabb.onmicrosoft.com'
password-secret: I6-8Q~NXUUTex3y1JUIFr33Q_SNKJZIsyQUXScst
solution-name: MaxSIevert
solution-output-file: out/exported/MaxSIevert.zip

- name: unpack-solution action
uses: microsoft/powerplatform-actions/unpack-solution@v0
with:
solution-file: out/exported/ALMLab.zip
solution-folder: out/solutions/ALMLab
solution-file: out/exported/MaxSIevert.zip
solution-folder: out/solutions/MaxSIevert
solution-type: 'Unmanaged'
overwrite-files: true

- name: branch-solution, prepare it for a PullRequest
uses: microsoft/powerplatform-actions/branch-solution@v0
with:
solution-folder: out/solutions/ALMLab
solution-target-folder: solutions/ALMLab
solution-folder: out/solutions/MaxSIevert
solution-target-folder: solutions/MaxSIevert
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty-commit: true