Skip to content

Commit 5741fb3

Browse files
committed
Fix GitHub Actions workflows to patch ModuleBuilder
1 parent eb2034e commit 5741fb3

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/code-analysis-built-module.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10-
# cSpell: ignore potatoqualitee codeql SARIF
10+
# cSpell: ignore codeql SARIF
1111
jobs:
1212
pssa:
1313
name: PSScriptAnalyzer
@@ -34,6 +34,14 @@ jobs:
3434
run: |
3535
Write-Information -MessageData 'Module is being built.' -InformationAction 'Continue'
3636
.\build.ps1 -ResolveDependency -Tasks 'build'
37+
# This is a workaround for the issue: https://github.com/PoshCode/ModuleBuilder/pull/136
38+
- name: Patch ModuleBuilder
39+
shell: powershell
40+
run: |
41+
Write-Information -MessageData 'Patching ModuleBuilder v3.1.7.' -InformationAction 'Continue'
42+
.\build.ps1 -Tasks 'noop'
43+
Install-PSResource -Name 'Viscalyx.Common' -Repository 'PSGallery' -TrustRepository -Quiet -Confirm:$false
44+
Install-ModulePatch -Uri https://raw.githubusercontent.com/viscalyx/Viscalyx.Common/refs/heads/main/patches/ModuleBuilder_3.1.7_patch.json -Force
3745
- name: Run PSScriptAnalyzer
3846
shell: powershell
3947
run: |

.github/workflows/code-analysis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10-
# cSpell: ignore potatoqualitee codeql SARIF
10+
# cSpell: ignore codeql SARIF
1111
jobs:
1212
pssa:
1313
name: PSScriptAnalyzer
@@ -34,6 +34,14 @@ jobs:
3434
run: |
3535
Write-Information -MessageData 'Module is being built so that examples can be scanned.' -InformationAction 'Continue'
3636
.\build.ps1 -ResolveDependency -Tasks 'build'
37+
# This is a workaround for the issue: https://github.com/PoshCode/ModuleBuilder/pull/136
38+
- name: Patch ModuleBuilder
39+
shell: powershell
40+
run: |
41+
Write-Information -MessageData 'Patching ModuleBuilder v3.1.7.' -InformationAction 'Continue'
42+
.\build.ps1 -Tasks 'noop'
43+
Install-PSResource -Name 'Viscalyx.Common' -Repository 'PSGallery' -TrustRepository -Quiet -Confirm:$false
44+
Install-ModulePatch -Uri https://raw.githubusercontent.com/viscalyx/Viscalyx.Common/refs/heads/main/patches/ModuleBuilder_3.1.7_patch.json -Force
3745
- name: Run PSScriptAnalyzer
3846
shell: powershell
3947
run: |

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
### Fixed
2020

21+
- Fixed workaround for the GitHub Actions to support building module in Windows
22+
PowerShell.
2123
- SqlServerDsc
2224
- Fix localization tests.
2325
- `SqlAudit`

0 commit comments

Comments
 (0)