Add support for signing packages
This commit is contained in:
parent
7019ab4922
commit
5a206374b0
14
pkgbuild.sh
14
pkgbuild.sh
|
@ -6,8 +6,20 @@ setPermissions() {
|
|||
chmod -R a+rw .
|
||||
}
|
||||
|
||||
importPrivateKey() {
|
||||
echo "$INPUT_GPGPRIVATEKEY" > private.key
|
||||
sudo -u nobody gpg --batch --pinentry-mode loopback --passphrase "$INPUT_GPGPASSPHRASE" --import private.key
|
||||
rm private.key
|
||||
sed -i -e "s/gpg/gpg --batch --pinentry-mode loopback --passphrase \"$INPUT_GPGPASSPHRASE\"/" /usr/share/makepkg/integrity/generate_signature.sh
|
||||
}
|
||||
|
||||
buildPackage() {
|
||||
sudo -u nobody makepkg -s --noconfirm
|
||||
if [ -n "$INPUT_GPGPRIVATEKEY" ] && [ -n "$INPUT_GPGPUBLICKEY" ]; then
|
||||
importPrivateKey
|
||||
sudo -u nobody makepkg -s --sign --key "$INPUT_GPGPUBLICKEY" --noconfirm
|
||||
else
|
||||
sudo -u nobody makepkg -s --noconfirm
|
||||
fi
|
||||
}
|
||||
|
||||
exportPackageFiles() {
|
||||
|
|
Loading…
Reference in New Issue