{"id":22695885,"url":"https://github.com/rajyraman/powerapps-deploy-solution","last_synced_at":"2025-04-22T19:25:26.907Z","repository":{"id":65161405,"uuid":"291343476","full_name":"rajyraman/powerapps-deploy-solution","owner":"rajyraman","description":"GitHub Action to deploy Power Apps Solutions","archived":false,"fork":false,"pushed_at":"2020-08-31T00:53:49.000Z","size":17,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T21:04:30.924Z","etag":null,"topics":["alm","cds","powerapps"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajyraman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-29T20:23:18.000Z","updated_at":"2025-03-01T08:47:26.000Z","dependencies_parsed_at":"2023-01-04T12:38:52.312Z","dependency_job_id":null,"html_url":"https://github.com/rajyraman/powerapps-deploy-solution","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fpowerapps-deploy-solution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fpowerapps-deploy-solution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fpowerapps-deploy-solution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajyraman%2Fpowerapps-deploy-solution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajyraman","download_url":"https://codeload.github.com/rajyraman/powerapps-deploy-solution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250307385,"owners_count":21409074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alm","cds","powerapps"],"created_at":"2024-12-10T04:12:15.508Z","updated_at":"2025-04-22T19:25:26.886Z","avatar_url":"https://github.com/rajyraman.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Power Apps Deploy Solution\r\n\r\nThis Action deploys a solution file in the Release with matching tag into the target environment.\r\n\r\n## Inputs\r\n\r\n| Input                | Required | Default | Description                                                                                                                                                                                                                                        |\r\n| -------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| token                | ✅       | -       | [GitHub Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). This is required for downloading the solution files from Releases.                                                    |\r\n| tag                  | ✅       | -       | Git Tag associated with the Release. If you are using [Power Apps Solution Extract Action](https://github.com/rajyraman/powerapps-solution-extract), it tags the Release with the Solution's version number.                                       |\r\n| solutionName         | ✅       | -       | The Unique Name of the solution. This is used in Solution Upgrade step, if you are deploying a Managed Solution.                                                                                                                                   |\r\n| targetEnvironmentUrl | ✅       | -       | Environment URL where the Solution will be deployed to.                                                                                                                                                                                            |\r\n| applicationId        | ✅       | -       | Application Id that will be used to connect to the Power Apps environment.Refer [Scott Durow's video](https://www.youtube.com/watch?v=Td7Bk3IXJ9s) if you do not know how to set Application Registration and scopes in Azure to facilitate this.  |\r\n| applicationSecret    | ✅       | -       | Secret that will be used in the Connection String for authenticating to Power Apps. Use GitHub Secrets on your repo to store this value. Refer to [Using Encrypted Secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#using-encrypted-secrets-in-a-workflow) on how to use this in your workflow. |\r\n| managed              |        | false   | By default, this Action will import Unmanaged solution. Set this parameter to true, if you want to import Managed Solution.                                                                                                                        |\r\n\r\n## Outputs\r\n\r\n| Output   | Description                                  |\r\n| -------- | -------------------------------------------- |\r\n| solution | File Name of the Solution that was imported. |\r\n\r\n## Example\r\n\r\nBelow is an example on how to use [Power Apps Solution Extract](https://github.com/rajyraman/powerapps-solution-extract/) and [Power Apps Deploy Solution](https://github.com/rajyraman/powerapps-deploy-solution/) in your Workflow.\r\n\r\n```yaml\r\n# This workflow is run only manually, as it uses a workflow_dispatch. It is recommended to use cron or push into main branch to trigger this. Since this workflow also commits into the repo, use ignore tags to prevent infinite loop. Refer https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-ignoring-branches-and-tags\r\n\r\nname: extract-and-deploy\r\non:\r\n  workflow_dispatch:\r\n    inputs:\r\n      solutionName:\r\n        description: \"Solution Name\"\r\n        required: true\r\n        default: \"GitHubSolution\"\r\n      sourceEnvironmentUrl:\r\n        description: \"Source Environment URL\"\r\n        required: true\r\n        default: \"https://xxxx.crm.dynamics.com\"\r\n      targetEnvironmentUrl:\r\n        description: \"Target Environment URL\"\r\n        required: true\r\n        default: \"https://xxxx.crm.dynamics.com\"\r\n      release:\r\n        description: \"Release?\"\r\n        required: true\r\n        default: true\r\n      managed:\r\n        description: \"Managed?\"\r\n        required: true\r\n        default: true\r\n      debug:\r\n        description: \"Debug?\"\r\n        required: true\r\n        default: \"true\"\r\n\r\njobs:\r\n  build:\r\n    # The type of runner that the job will run on. This needs to be Windows runner.\r\n    runs-on: windows-latest\r\n\r\n    steps:\r\n      - uses: actions/checkout@v2\r\n\r\n      - name: Dump GitHub context\r\n        if: github.event.inputs.debug == 'true'\r\n        env:\r\n          GITHUB_CONTEXT: ${{ toJson(github) }}\r\n        run: echo \"$GITHUB_CONTEXT\"\r\n\r\n      - name: Extract Solution\r\n        id: extract-solution\r\n        uses: rajyraman/powerapps-solution-extract@v1.1\r\n        with:\r\n          token: ${{ secrets.GITHUB_TOKEN }}\r\n          solutionName: ${{ github.event.inputs.solutionName }}\r\n          sourceEnvironmentUrl: ${{ github.event.inputs.sourceEnvironmentUrl }}\r\n          applicationId: ${{ secrets.APPLICATION_ID }}\r\n          applicationSecret: ${{ secrets.APPLICATION_SECRET }}\r\n          releaseSolution: ${{ github.event.inputs.release }}\r\n\r\n      - name: Deploy Solution\r\n        id: deploy-solution\r\n        uses: rajyraman/powerapps-deploy-solution@v1.1\r\n        with:\r\n          token: ${{ secrets.GITHUB_TOKEN }}\r\n          solutionName: ${{ github.event.inputs.solutionName }}\r\n          targetEnvironmentUrl: ${{ github.event.inputs.targetEnvironmentUrl }}\r\n          applicationId: ${{ secrets.APPLICATION_ID }}\r\n          applicationSecret: ${{ secrets.APPLICATION_SECRET }}\r\n          tag: ${{ steps.extract-solution.outputs.solutionVersion }}\r\n          managed: ${{ github.event.inputs.managed }}\r\n\r\n\r\n        # This step below can be removed, if you do not want to send a notification to Teams about this solution deployment.\r\n      - name: Notify Teams\r\n        uses: fjogeleit/http-request-action@v1.4.1\r\n        with:\r\n          # Url to Power Automate Flow to notify about Solution Deployment\r\n          url: \"${{ secrets.FLOW_HTTP_URL }}\"\r\n          # Request body to be sent the Flow with HTTP Trigger\r\n          data: \u003e-\r\n            {\r\n                \"solutionFile\": \"${{ steps.deploy-solution.outputs.solution }}\",\r\n                \"tag\": \"${{ steps.deploy-solution.outputs.solutionVersion }}\",\r\n                \"environmentUrl\": \"${{ github.event.inputs.targetEnvironmentUrl }}\",\r\n                \"repoUrl\": \"https://github.com/${{ github.repository }}\",\r\n                \"runId\": \"${{ github.run_id }}\",\r\n                \"sha\": \"${{ github.sha }}\"\r\n            }\r\n```\r\n\r\n## Credits\r\n\r\n1. Wael Hamze for [Xrm CI Framework](https://github.com/WaelHamze/xrm-ci-framework)\r\n2. Microsoft for [PowerShellForGitHub](https://github.com/microsoft/PowerShellForGitHub)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajyraman%2Fpowerapps-deploy-solution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajyraman%2Fpowerapps-deploy-solution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajyraman%2Fpowerapps-deploy-solution/lists"}