Skip to content

Commit e1237bb

Browse files
kgraefejon-turney
authored andcommitted
Add pubkey support
Signed-off-by: Konrad Gräfe <[email protected]>
1 parent a12ef94 commit e1237bb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Parameters
2424
| packages | *none* | List of additional packages to install.
2525
| install-dir | C:\cygwin | Installation directory
2626
| site | http://mirrors.kernel.org/sourceware/cygwin/ | Mirror sites to install from, separated by whitespace
27+
| pubkeys | *none* | Absolute paths of extra public key files (RFC4880 format), separated by whitespace
2728
| check-sig | true | Whether to check the setup.ini signature
2829
| add-to-path | true | Whether to add Cygwin's `/bin` directory to the system `PATH`
2930

action.yml

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ inputs:
1919
description: Should the setup.ini file signature be checked?
2020
required: false
2121
default: true
22+
pubkeys:
23+
description: Absolute paths of extra public key files (RFC4880 format), separated by whitespace
24+
required: false
2225
site:
2326
description: Download site URLs separated by whitespace
2427
required: false
@@ -76,6 +79,16 @@ runs:
7679
$args += '-X'
7780
}
7881
82+
if ( '${{ inputs.pubkeys }}' ) {
83+
$pubkeys = '${{ inputs.pubkeys }}'
84+
$pubkey_list = $pubkeys.Split('', [System.StringSplitOptions]::RemoveEmptyEntries)
85+
$pubkey_list = $pubkey_list | % { $_.Trim() }
86+
foreach ($pubkey in $pubkey_list) {
87+
$args += '-K'
88+
$args += $pubkey
89+
}
90+
}
91+
7992
if ($platform -eq 'x86') {
8093
$args += '--allow-unsupported-windows'
8194
}

0 commit comments

Comments
 (0)