Skip to content

Commit c2fc901

Browse files
author
tester bester
committed
compiles the DSC configuration before attempting to apply it.
1 parent 4b88449 commit c2fc901

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/DSC-based.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ jobs:
2121

2222
- name: Compile DSC Configuration
2323
run: |
24-
# This command runs your script and creates the 'DesktopPackages' directory.
25-
.\scripts\Apply_DSC_Desktop_Config.ps1
24+
# Dot-source the DSC script to load the Configuration block
25+
. .\scripts\Apply_DSC_Desktop_Config.ps1
26+
27+
# Call the configuration function to compile the MOF file
28+
# This is what creates the 'DesktopPackages' directory.
29+
DesktopPackages
2630
shell: pwsh
2731

2832
- name: Apply DSC Configuration
2933
run: |
30-
# This command applies the compiled configuration from the 'DesktopPackages' directory.
34+
# This command will now find the 'DesktopPackages' directory
3135
Start-DscConfiguration -Path .\DesktopPackages -Wait -Verbose
3236
shell: pwsh

0 commit comments

Comments
 (0)