-
Notifications
You must be signed in to change notification settings - Fork 184
47 lines (42 loc) · 1.81 KB
/
solution-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Solution Check
on:
workflow_dispatch:
inputs:
sample_name:
description: Which sample do you want to run a solution check on?
jobs:
check-solution:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
lfs: true
- if: ${{ false }} # this will never run, but will force powerplatform-actions to download
name: force-pac-download
uses: microsoft/powerplatform-actions/unpack-solution@latest
with:
solution-file: fake.zip
solution-folder: fake
- if: ${{ always() }}
id: get-pac-path
name: get-pac-path
shell: pwsh
run: |
$actionsPath = "${{ runner.temp }}".Replace("_temp","_actions")
if ($env:RUNNER_OS -eq "Windows") {
$array = Get-ChildItem $actionsPath -Recurse | Where-Object{$_.FullName.EndsWith('pac\tools\pac.exe')}
}
else {
$array = Get-ChildItem $actionsPath -Recurse | Where-Object{$_.FullName.EndsWith('pac_linux/tools/pac')}
}
$pacPath = $array[0].Directory.FullName
"$pacPath" >> $env:GITHUB_PATH
- id: pac-solution-pack
name: pac-solution-pack
shell: pwsh
run: pac solution pack --zipfile samples/${{ github.event.inputs.sample_name }}/solution/${{ github.event.inputs.sample_name }}.zip --folder samples/${{ github.event.inputs.sample_name }}/sourcecode --packagetype Unmanaged --processCanvasApps
- id: pac-solution-check
name: pac-solution-check
shell: pwsh
run: pac solution check --path samples/${{ github.event.inputs.sample_name }}/solution/${{ github.event.inputs.sample_name }}.zip --outputDirectory samples/${{ github.event.inputs.sample_name }}/solution/ --geo UnitedStates