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

New action request for copilot publish #620

Open
prabdeb opened this issue Dec 5, 2024 · 2 comments
Open

New action request for copilot publish #620

prabdeb opened this issue Dec 5, 2024 · 2 comments

Comments

@prabdeb
Copy link
Member

prabdeb commented Dec 5, 2024

Requesting for new action that will publish Copilot after solution import.

Reference command: pac copilot publish

@devkeydet
Copy link
Contributor

devkeydet commented Dec 5, 2024

I will defer to the GitHub Actions for Power Platform team on the feature request, but have a workaround to unblock you for now. GitHub Actions for Power Platform have an "escape hatch" when the actions haven't caught up to the underlying pac commands. When you use actions-install, set add-tools-to-path: true. By doing so, you get the version of pac that the actions use. You can then use it directly in script actions. Here's an example:

name: use-pac-from-actions
on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Power Platform Actions
        uses: microsoft/powerplatform-actions/actions-install@v1
        with:
          add-tools-to-path: true
      - name: create pac auth profile
        shell: pwsh
        run: |
          # create a pac auth profile
          pac auth create --name temp-for-workflow --url ${{ secrets.ENVIRONMENT_URL }} --applicationId ${{ secrets.APP_ID }} --clientSecret ${{ secrets.CLIENT_SECRET }} --tenant ${{ secrets.TENANT_ID }}
      - name: use pac
        shell: pwsh
        run: |
          # use pac with the profile created
          pac auth who

Following this approach/pattern, you should be able to use pac copilot publish directly.

@prabdeb
Copy link
Member Author

prabdeb commented Dec 6, 2024

Thanks @devkeydet the similar workaround we have taken for our implementation. From the same learnings, I am going to raise two PR's in this and CLI Wrapper repository, please have a look if they will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants