File tree Expand file tree Collapse file tree 6 files changed +16
-9
lines changed
Expand file tree Collapse file tree 6 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Test
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [ main, 'fix/**' ]
66 paths-ignore :
77 - ' **.md'
88 - ' **.MD'
1717
1818jobs :
1919 test :
20- runs-on : windows-2019
20+ runs-on : windows-2022
2121 name : Test
2222 env :
2323 TEST1 : Test1
2626 TEST_MAPPING_PATH : " C:\\ map"
2727 strategy :
2828 matrix :
29- docker_container : ["mcr.microsoft.com/windows/servercore:ltsc2019 "]
29+ docker_container : ["mcr.microsoft.com/windows/servercore:ltsc2022 "]
3030
3131 steps :
3232 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Original file line number Diff line number Diff line change @@ -93,14 +93,15 @@ runs:
9393 shell : powershell
9494 - name : Run
9595 run : >-
96- $eventPath = Split-Path -Path "${env:GITHUB_EVENT_PATH}" -Parent;
96+ $runnerPathSource = Split-Path -Path "${env:RUNNER_TEMP}" -Parent;
97+ $runnerPathTarget = $runnerPathSource.replace('D:', 'C:')
9798
9899 docker run
99100 ${{ steps.settings.outputs.default_environment_variables }}
100101 ${{ steps.settings.outputs.extra_args }}
101102 --rm
102103 --memory=${{ inputs.memory }}
103- -v ${eventPath }:${eventPath }
104+ -v ${runnerPathSource }:${runnerPathTarget }
104105 -v ${{ steps.settings.outputs.workspace_path }}:${{ steps.settings.outputs.mapping_path }}
105106 -w ${{ steps.settings.outputs.work_path }}
106107 ${{ inputs.image }}
Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ $args_env = & "$splitToArgs" -argument_name "@--env" -env_arrays "$envNames";
1616$args_entrypoint = & " $setOptionalVariable " - argument_name " @--entrypoint" - setVal " $entryPoint " ;
1717$eargs = & " $trimArg " - arg " $extraArgs " ;
1818$allargs = " @" + " ${eargs} " + " " + " ${args_env} " + " " + " ${args_entrypoint} " ;
19- & " $setoutputVariable " - name extra_args - val " $allargs " ;
19+ & " $setoutputVariable " -replace " " - name extra_args - val " $allargs " ;
Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ $work_space_path = & "$getVariable" -defaultVal "$githubWorkSpace" -setVal "$wor
1414$mapping_path = & " $getVariable " - defaultVal " $work_space_path " - setVal " $mappingPath " ;
1515$work_path = & " $getVariable " - defaultVal " $mapping_path " - setVal " $workPath " ;
1616
17- & " $setoutputVariable " - name workspace_path - val " $work_space_path " ;
17+ & " $setoutputVariable " -replace " " - name workspace_path - val " $work_space_path " ;
1818& " $setoutputVariable " - name mapping_path - val " $mapping_path " ;
1919& " $setoutputVariable " - name work_path - val " $work_path " ;
Original file line number Diff line number Diff line change 22# set github output with name and value
33param (
44 $name ,
5- $val = ' @'
5+ $val = ' @' ,
6+ $replace = ' D:' ,
7+ $with = ' C:'
68)
79
810$invovationPath = " $PSScriptRoot " ;
911$trimArg = " $invovationPath " + " \trim_arg.ps1" ;
1012
1113$trimmed_name = & $trimArg - arg $name ;
1214$trimmed_val = & $trimArg - arg $val ;
15+ if ( $replace -ne " " ) {
16+ $trimmed_val = $trimmed_val.Replace ( $replace , $with );
17+ }
1318
1419function toGitHub {
1520 param (
1621 $output_name ,
1722 $output_value
1823 )
24+ Write-Output " $output_name =$output_value "
1925 " $output_name =$output_value " >> $env: GITHUB_OUTPUT ;
2026}
2127
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Describe "run_default" {
1616
1717 Context " default GitHub Action paths should be available" {
1818 It " GITHUB_EVENT_PATH should exist" {
19- " $env: GITHUB_EVENT_PATH " | Should - Exist
19+ " $env: GITHUB_EVENT_PATH " .Replace( ' D: ' , ' C: ' ) | Should - Exist
2020 }
2121 }
2222}
You can’t perform that action at this time.
0 commit comments