Remove PGP keys recive in Dokerfile. And add auto PGP keys sacn and rec in build.sh

This commit is contained in:
2026-08-26 21:56:59 +02:00
parent c3bb4bde9c
commit fdf3c9e4bf
2 changed files with 21 additions and 6 deletions
+19 -1
View File
@@ -2,6 +2,24 @@
echo "Package src dir: $1"
echo "Package bin dir: $2"
docker run --interactive --tty --rm --volume $1:/pkgsrc:z --volume $2:/artifact:z artix-build-env bash -c "sudo pacman -Sy --noconfirm && cp -r /pkgsrc/* ./ && makepkg -Ccsf --noconfirm && cp *.pkg.tar.zst /artifact/"
keys_dir="$1/keys/pgp"
pgp_keys=""
# Check if pgp dir exist and it is not symlink
if [ -d "$keys_dir" ] && [ ! -L "$keys_dir" ]; then
echo "PGP keys dir exist: $keys_dir"
pgp_keys="gpg --recv-keys "
for f in "$dir"/*; do
filename="${f##*/}"
echo "Located PGP key: $filename"
pgp_keys="$pgp_keys ${filename%.*}"
done
pgp_keys="${pgp_keys# }" # strip leading space instead
fi
docker run --interactive --tty --rm --volume $1:/pkgsrc:z --volume $2:/artifact:z artix-build-env bash -c "$pgp_keys && sudo pacman -Sy --noconfirm && cp -r /pkgsrc/* ./ && makepkg -Ccsf --noconfirm && cp *.pkg.tar.zst /artifact/"