Skip to content

run-windows-matrix

run-windows-matrix #9

name: run-windows-matrix
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022]
fail-fast: false
steps:
- name: Run pwsh
run: |
Get-Content "$env:USERPROFILE/.docker/config.json"
docker
shell: pwsh
- name: append env
shell: pwsh
run: |
$currentPath = [System.Environment]::GetEnvironmentVariable("PATH", "User")
Write-Host "currentPATH:"
$currentPath
$newPath = "C:\temp" + ';' + $currentPath
Write-Host "newPath"
$newPath
[Environment]::SetEnvironmentVariable("PATH", $newPath, "User")
Write-host "show envPATH"
$env:PATH
- name: show PATH
shell: pwsh
run: |
$PATH
Write-host "show envPATH"
$env:PATH