Skip to content

fix(ci): register PSGallery before trusting it - #13

Merged
Dashtid merged 1 commit into
mainfrom
fix/psgallery-not-registered
Aug 17, 2026
Merged

fix(ci): register PSGallery before trusting it#13
Dashtid merged 1 commit into
mainfrom
fix/psgallery-not-registered

Conversation

@Dashtid

@Dashtid Dashtid commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Post-merge main surfaced an unrelated failure in ci.yml — a workflow #12 never touched.

Set-PSRepository: No repository with the name 'PSGallery' was found.

The hosted runner image no longer ships PSGallery pre-registered, so Set-PSRepository fails outright. Last green ci.yml run was 2026-08-04, so this is a runner-image regression that surfaced on the first push since.

Fix registers the default repositories when PSGallery is missing, then trusts it exactly as before. Applied to all three call sites — PSScriptAnalyzer install, Windows Pester install, Linux Pester install — so the next scheduled run doesn't rediscover it in the other two.

private-toolkit is unaffected: it calls Install-Module directly and never touches repository registration.

The hosted runner image no longer ships with PSGallery pre-registered, so
'Set-PSRepository PSGallery -InstallationPolicy Trusted' now fails hard:

  Set-PSRepository: No repository with the name 'PSGallery' was found.

This broke the PowerShell Analysis job (and would break both Pester jobs on
their next run) in ci.yml - a workflow untouched by the trivy permissions fix
merged in #12. Last green ci.yml run was 2026-08-04; the image changed since.

Register-PSRepository -Default when PSGallery is absent, then trust it as
before. Applied to all three call sites (PSScriptAnalyzer install, Windows
Pester install, Linux Pester install) so the next scheduled run does not
rediscover it. private-toolkit is unaffected because it calls Install-Module
directly without touching the repository registration.
@github-actions github-actions Bot added the ci/cd label Aug 17, 2026
@github-actions

Copy link
Copy Markdown

Linux Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 3 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit c6f9fde. ± Comparison against base commit b6dca5e.

@github-actions

Copy link
Copy Markdown

Windows Test Results

609 tests   609 ✅  36s ⏱️
208 suites    0 💤
  1 files      0 ❌

Results for commit c6f9fde.

@Dashtid
Dashtid merged commit 02ad94a into main Aug 17, 2026
24 checks passed
@Dashtid
Dashtid deleted the fix/psgallery-not-registered branch August 17, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant