updated workflows to use powerplatform-actions
This commit is contained in:
Родитель
defb853d67
Коммит
d251347726
|
@ -46,7 +46,7 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
- run: npm i
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
@ -83,23 +83,10 @@ jobs:
|
|||
solution-file: ${{ runner.temp }}/solution.zip
|
||||
run-asynchronously: true
|
||||
|
||||
- name: Authenticate to Dataverse
|
||||
run: |
|
||||
pac/pac auth create `
|
||||
--url $env:URL `
|
||||
--applicationId $env:APPLICATION_ID `
|
||||
--clientSecret $env:CLIENT_SECRET `
|
||||
--tenant $env:TENANT_ID `
|
||||
--cloud Public
|
||||
env:
|
||||
URL: ${{ secrets.URL }}
|
||||
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
|
||||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
|
||||
TENANT_ID: ${{ secrets.TENANT_ID }}
|
||||
shell: powershell
|
||||
|
||||
- name: Import portal
|
||||
run: |
|
||||
pac/pac paportal upload `
|
||||
--path ${{ runner.temp }}/portal/starter-portal
|
||||
shell: powershell
|
||||
- uses: microsoft/powerplatform-actions/upload-paportal@v0
|
||||
with:
|
||||
environment-url: ${{ secrets.URL }}
|
||||
app-id: ${{ secrets.APPLICATION_ID }}
|
||||
client-secret: ${{ secrets.CLIENT_SECRET }}
|
||||
tenant-id: ${{ secrets.TENANT_ID }}
|
||||
upload-path: ${{ runner.temp }}/portal/starter-portal
|
||||
|
|
|
@ -4,7 +4,7 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_message:
|
||||
description: 'Message for the commit'
|
||||
description: "Message for the commit"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
|
@ -13,36 +13,19 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
- name: Authenticate to Dataverse
|
||||
run: |
|
||||
pac/pac auth create `
|
||||
--url $env:URL `
|
||||
--applicationId $env:APPLICATION_ID `
|
||||
--clientSecret $env:CLIENT_SECRET `
|
||||
--tenant $env:TENANT_ID `
|
||||
--cloud Public
|
||||
env:
|
||||
URL: ${{ secrets.URL }}
|
||||
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
|
||||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
|
||||
TENANT_ID: ${{ secrets.TENANT_ID }}
|
||||
shell: powershell
|
||||
|
||||
- name: Delete portal folder
|
||||
run: rm portal -Recurse -Force -ErrorAction Ignore
|
||||
|
||||
- name: Export portal
|
||||
run: |
|
||||
pac/pac paportal download `
|
||||
--path portal `
|
||||
--websiteId $env:WEBSITE_ID
|
||||
env:
|
||||
WEBSITE_ID: f46b70cc-580b-4f1a-87c3-41deb48eb90d
|
||||
shell: powershell
|
||||
|
||||
- uses: microsoft/powerplatform-actions/download-paportal@v0
|
||||
with:
|
||||
environment-url: ${{ secrets.URL }}
|
||||
app-id: ${{ secrets.APPLICATION_ID }}
|
||||
client-secret: ${{ secrets.CLIENT_SECRET }}
|
||||
tenant-id: ${{ secrets.TENANT_ID }}
|
||||
download-path: portal
|
||||
website-id: f46b70cc-580b-4f1a-87c3-41deb48eb90d
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
|
@ -54,4 +37,4 @@ jobs:
|
|||
git commit -m $env:COMMIT_MESSAGE --author "${{ github.actor }}"
|
||||
git push
|
||||
env:
|
||||
COMMIT_MESSAGE: ${{ github.event.inputs.commit_message }}
|
||||
COMMIT_MESSAGE: ${{ github.event.inputs.commit_message }}
|
||||
|
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
- run: npm i
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
@ -42,19 +42,17 @@ jobs:
|
|||
environment: development
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: solution
|
||||
path: ${{ runner.temp }}
|
||||
path: solution
|
||||
name: Download solution
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: portal
|
||||
path: ${{ runner.temp }}/portal
|
||||
path: portal
|
||||
name: Download portal
|
||||
|
||||
- uses: microsoft/powerplatform-actions/import-solution@v0
|
||||
with:
|
||||
|
@ -62,26 +60,13 @@ jobs:
|
|||
app-id: ${{ secrets.APPLICATION_ID }}
|
||||
client-secret: ${{ secrets.CLIENT_SECRET }}
|
||||
tenant-id: ${{ secrets.TENANT_ID }}
|
||||
solution-file: ${{ runner.temp }}/solution.zip
|
||||
solution-file: solution/solution.zip
|
||||
run-asynchronously: true
|
||||
|
||||
- name: Authenticate to Dataverse
|
||||
run: |
|
||||
pac/pac auth create `
|
||||
--url $env:URL `
|
||||
--applicationId $env:APPLICATION_ID `
|
||||
--clientSecret $env:CLIENT_SECRET `
|
||||
--tenant $env:TENANT_ID `
|
||||
--cloud Public
|
||||
env:
|
||||
URL: ${{ secrets.URL }}
|
||||
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
|
||||
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
|
||||
TENANT_ID: ${{ secrets.TENANT_ID }}
|
||||
shell: powershell
|
||||
|
||||
- name: Import portal
|
||||
run: |
|
||||
pac/pac paportal upload `
|
||||
--path ${{ runner.temp }}/portal/starter-portal
|
||||
shell: powershell
|
||||
- uses: microsoft/powerplatform-actions/upload-paportal@v0
|
||||
with:
|
||||
environment-url: ${{ secrets.URL }}
|
||||
app-id: ${{ secrets.APPLICATION_ID }}
|
||||
client-secret: ${{ secrets.CLIENT_SECRET }}
|
||||
tenant-id: ${{ secrets.TENANT_ID }}
|
||||
upload-path: portal/starter-portal
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
name: Update Pac
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Clone powerplatform-actions
|
||||
run: git clone https://github.com/microsoft/powerplatform-actions.git $RUNNER_TEMP/powerplatform-actions
|
||||
|
||||
- name: Delete existing pac folder
|
||||
run: rm pac -rf
|
||||
|
||||
- name: Copy pac folder from powerplatform-actions
|
||||
run: cp -r $RUNNER_TEMP/powerplatform-actions/dist/pac/tools pac
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
|
||||
- name: Commit
|
||||
run: |
|
||||
git add .
|
||||
git commit -m "updated pac using workflow (run id $GITHUB_RUN_ID)" --author "${{ github.actor }}"
|
||||
git push
|
Загрузка…
Ссылка в новой задаче