Skip to content

Commit f70b0a8

Browse files
committed
Update github-workflows source location for Windows docker
The workspace is mounted into `C:\source` when using docker, update the script root to take that into account.
1 parent dcbe514 commit f70b0a8

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
@@ -684,10 +684,16 @@ jobs:
684684
- name: Determine script-root path
685685
id: script_path
686686
run: |
687+
if ("${{ inputs.enable_windows_docker }}" -eq "true") {
688+
$source = "C:\source"
689+
} else {
690+
$source = $env:GITHUB_WORKSPACE
691+
}
692+
687693
if ("${{ github.repository }}" -eq "swiftlang/github-workflows") {
688-
echo "root=$env:GITHUB_WORKSPACE" >> $env:GITHUB_OUTPUT
694+
echo "root=$source" >> $env:GITHUB_OUTPUT
689695
} else {
690-
echo "root=$env:GITHUB_WORKSPACE/github-workflows" >> $env:GITHUB_OUTPUT
696+
echo "root=$source/github-workflows" >> $env:GITHUB_OUTPUT
691697
}
692698
- name: Provide token
693699
if: ${{ inputs.needs_token }}

0 commit comments

Comments
 (0)