Skip to content

Commit f5e0f04

Browse files
committed
Make adjustments for x86 being archived
Use --allow-unsupported-windows option, and archive site-url for x86
1 parent d3ac917 commit f5e0f04

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

action.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ inputs:
2222
site:
2323
description: Download site URL
2424
required: false
25-
default: http://mirrors.kernel.org/sourceware/cygwin/
2625

2726
runs:
2827
using: "composite"
@@ -37,17 +36,26 @@ runs:
3736
exit 1
3837
}
3938
Invoke-WebRequest https://cygwin.com/setup-$platform.exe -OutFile C:\setup.exe
40-
shell: powershell
4139
42-
- run: |
4340
$packages = '${{ inputs.packages }}'
4441
$pkg_list = $packages.Split('', [System.StringSplitOptions]::RemoveEmptyEntries)
4542
$pkg_list = $pkg_list | % { $_.Trim() }
4643
$pkg_list = $pkg_list | % { $_.Trim(',') }
4744
45+
# default site if not specified
46+
if (! '${{ inputs.site }}' ) {
47+
if ($platform -eq 'x86') {
48+
$site = 'http://mirrors.kernel.org/sourceware/cygwin-archive/20221123'
49+
} else {
50+
$site = 'http://mirrors.kernel.org/sourceware/cygwin/'
51+
}
52+
} else {
53+
$site = '${{ inputs.site }}'
54+
}
55+
4856
$args = @(
4957
'-qgnO',
50-
'-s', '${{ inputs.site }}',
58+
'-s', $site,
5159
'-l', 'C:\cygwin-packages',
5260
'-R', '${{ inputs.install-dir }}'
5361
)
@@ -61,6 +69,10 @@ runs:
6169
$args += '-X'
6270
}
6371
72+
if ($platform -eq 'x86') {
73+
$args += '--allow-unsupported-windows'
74+
}
75+
6476
# because setup is a Windows GUI app, make it part of a pipeline to make
6577
# PowerShell wait for it to exit
6678
& C:\setup.exe $args | Out-Default

0 commit comments

Comments
 (0)