diff --git a/.github/workflows/export-and-branch-solution-MaxSievert.yml b/.github/workflows/export-and-branch-solution-MaxSievert.yml new file mode 100644 index 0000000..6266712 --- /dev/null +++ b/.github/workflows/export-and-branch-solution-MaxSievert.yml @@ -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 diff --git a/.github/workflows/export-and-branch-solution.yml b/.github/workflows/export-and-branch-solution.yml index e715a1d..6c49a5f 100644 --- a/.github/workflows/export-and-branch-solution.yml +++ b/.github/workflows/export-and-branch-solution.yml @@ -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