Skip to content

Commit

Permalink
Add pubkey support
Browse files Browse the repository at this point in the history
Signed-off-by: Konrad Gräfe <kgraefe@paktolos.net>
  • Loading branch information
kgraefe authored and jon-turney committed Apr 7, 2023
1 parent a12ef94 commit e1237bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Parameters
| packages | *none* | List of additional packages to install.
| install-dir | C:\cygwin | Installation directory
| site | http://mirrors.kernel.org/sourceware/cygwin/ | Mirror sites to install from, separated by whitespace
| pubkeys | *none* | Absolute paths of extra public key files (RFC4880 format), separated by whitespace
| check-sig | true | Whether to check the setup.ini signature
| add-to-path | true | Whether to add Cygwin's `/bin` directory to the system `PATH`

Expand Down
13 changes: 13 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
description: Should the setup.ini file signature be checked?
required: false
default: true
pubkeys:
description: Absolute paths of extra public key files (RFC4880 format), separated by whitespace
required: false
site:
description: Download site URLs separated by whitespace
required: false
Expand Down Expand Up @@ -76,6 +79,16 @@ runs:
$args += '-X'
}
if ( '${{ inputs.pubkeys }}' ) {
$pubkeys = '${{ inputs.pubkeys }}'
$pubkey_list = $pubkeys.Split('', [System.StringSplitOptions]::RemoveEmptyEntries)
$pubkey_list = $pubkey_list | % { $_.Trim() }
foreach ($pubkey in $pubkey_list) {
$args += '-K'
$args += $pubkey
}
}
if ($platform -eq 'x86') {
$args += '--allow-unsupported-windows'
}
Expand Down

0 comments on commit e1237bb

Please sign in to comment.