File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,13 +106,22 @@ jobs:
106106 run : |
107107 echo ${{ secrets.GITHUB_TOKEN }} |
108108 docker login -u sys-lzdev --password-stdin ghcr.io
109+ - name : Switch to Windows containers (Windows only)
110+ if : matrix.os.name == 'windows'
111+ run : |
112+ & "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon
113+ shell : powershell
109114 - name : Build image
110115 run : |
111116 docker info
112117 docker build \
113118 ${{ runner.os == 'Windows' && ' \
114119 --memory 16G ' || ' '
115120 }}\
121+ ${{ matrix.os.name == 'windows' && ' \
122+ --platform windows/amd64 ' || ' \
123+ --platform linux/amd64 '
124+ }}\
116125 ${{ matrix.os.vmaj != '' && format(' \
117126 --build-arg VMAJ={0} \
118127 --build-arg VMIN={1} ', matrix.os.vmaj, matrix.os.vmin) || ' '
@@ -127,6 +136,10 @@ jobs:
127136 docker run \
128137 --rm \
129138 --interactive \
139+ ${{ matrix.os.name == 'windows' && ' \
140+ --platform windows/amd64 ' || ' \
141+ --platform linux/amd64 '
142+ }}\
130143 -v '${{ github.workspace }}':${MOUNT_TARGET} \
131144 -w ${MOUNT_TARGET}/build \
132145 -e CCACHE_BASEDIR=${MOUNT_TARGET} \
You can’t perform that action at this time.
0 commit comments