From fad8822b80aec247c158324d13ada269affab7d3 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 10 Jul 2026 12:33:05 +0200 Subject: [PATCH 1/2] Skip version resolution on non-PR events so schedule/dispatch runs don't fail (#373) --- .github/workflows/Plan.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/Plan.yml b/.github/workflows/Plan.yml index 3a25e0f4..6a5f679c 100644 --- a/.github/workflows/Plan.yml +++ b/.github/workflows/Plan.yml @@ -85,6 +85,12 @@ jobs: ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }} - name: Resolve-Version + # Version resolution requires pull_request context (PR labels + head ref decide the + # bump and the prerelease name). Skip it on non-PR events (schedule, workflow_dispatch, + # push): there ReleaseType is 'None', nothing is published, and Enrich-Settings falls + # back to safe empty defaults. Without this gate the action throws on non-PR events and + # fails the whole run. Fixes #373. + if: github.event_name == 'pull_request' uses: PSModule/Resolve-PSModuleVersion@d53326c7687d20a7949d457fccd71223856b1890 # v1.1.0 id: Resolve-Version env: From 7a5a176abbb6c1de1c04c1d5c10e610cb0b99ba8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 10 Jul 2026 12:48:40 +0200 Subject: [PATCH 2/2] Fall back to 999.0.0 placeholder for module-local test import on non-PR runs (#373) --- .github/workflows/Test-ModuleLocal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Test-ModuleLocal.yml b/.github/workflows/Test-ModuleLocal.yml index fa534551..0901d405 100644 --- a/.github/workflows/Test-ModuleLocal.yml +++ b/.github/workflows/Test-ModuleLocal.yml @@ -82,4 +82,4 @@ jobs: WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }} Prescript: | # This is to speed up module loading in Pester. Install-PSResource -Repository PSGallery -TrustRepository -Name PSCustomObject - Import-Module -Name '${{ steps.import-module.outputs.name }}' -RequiredVersion '${{ fromJson(inputs.Settings).Module.Version }}' + Import-Module -Name '${{ steps.import-module.outputs.name }}' -RequiredVersion '${{ fromJson(inputs.Settings).Module.Version != '' && fromJson(inputs.Settings).Module.Version || '999.0.0' }}'