Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 4s
28 lines
1.1 KiB
YAML
28 lines
1.1 KiB
YAML
name: Runner probe (throwaway)
|
|
|
|
# Temporary diagnostic: discover the silverlabs-runner-win host identity, drives,
|
|
# existing share mounts/stored creds, and whether the base ISO is reachable -
|
|
# so we can pick the simplest path (local path vs persistent SMB mount). Delete
|
|
# once the ISO source is wired. workflow_dispatch only.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
probe:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Probe SMB as SYSTEM (credential-less net use via stored cmdkey)
|
|
shell: pwsh
|
|
env:
|
|
ISO_SRC: ${{ vars.SILVERMETAL_BASE_ISO_URL }}
|
|
run: |
|
|
Write-Host "user=$(whoami)"
|
|
$root = [regex]::Match($env:ISO_SRC, '^\\\\[^\\]+\\[^\\]+').Value
|
|
Write-Host "--- credential-less net use $root (should consume stored SYSTEM cmdkey) ---"
|
|
$r = cmd /c "net use `"$root`"" 2>&1 | Out-String
|
|
Write-Host $r
|
|
Write-Host ("UNC exists after net use = {0}" -f [bool](Test-Path -LiteralPath $env:ISO_SRC))
|
|
cmd /c "net use `"$root`" /delete /y" 2>&1 | Out-Null
|