Skip to content

Commit 0afed44

Browse files
authored
Update github-workflows source location for Windows docker (#186)
The workspace is mounted into `C:\source` when using docker, update the script root to take that into account.
1 parent 30f1411 commit 0afed44

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/swift_package_test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,16 @@ jobs:
692692
- name: Determine script-root path
693693
id: script_path
694694
run: |
695+
if ("${{ inputs.enable_windows_docker }}" -eq "true") {
696+
$source = "C:\source"
697+
} else {
698+
$source = $env:GITHUB_WORKSPACE
699+
}
700+
695701
if ("${{ github.repository }}" -eq "swiftlang/github-workflows") {
696-
echo "root=$env:GITHUB_WORKSPACE" >> $env:GITHUB_OUTPUT
702+
echo "root=$source" >> $env:GITHUB_OUTPUT
697703
} else {
698-
echo "root=$env:GITHUB_WORKSPACE/github-workflows" >> $env:GITHUB_OUTPUT
704+
echo "root=$source/github-workflows" >> $env:GITHUB_OUTPUT
699705
}
700706
- name: Provide token
701707
if: ${{ inputs.needs_token }}

0 commit comments

Comments
 (0)