mirror of
https://github.com/luzifer-docker/arch-repo-builder.git
synced 2024-12-20 17:41:19 +00:00
Add key retrieval
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
ffe6c7e437
commit
fe09c47717
3 changed files with 20 additions and 0 deletions
|
@ -18,5 +18,6 @@ VOLUME ["/src", "/repo", "/config"]
|
|||
WORKDIR /src
|
||||
|
||||
COPY run.sh /usr/local/bin/
|
||||
COPY getkeys.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/run.sh"]
|
||||
|
|
16
getkeys.sh
Executable file
16
getkeys.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
[ -f "PKGBUILD" ] || {
|
||||
echo "No PKGBUILD file found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
source PKGBUILD
|
||||
|
||||
[ -n "${validgpgkeys:-}" ] || {
|
||||
echo "No 'validgpgkeys' directive found, nothing to do"
|
||||
exit 0
|
||||
}
|
||||
|
||||
exec gpg --recv-keys "${validgpgkeys[@]}"
|
3
run.sh
3
run.sh
|
@ -30,6 +30,9 @@ fi
|
|||
# Update pacman index
|
||||
pacman -Sy
|
||||
|
||||
# Retrieve GPG keys if required
|
||||
gosu builder getkeys.sh
|
||||
|
||||
# Execute the build itself
|
||||
gosu builder makepkg ${MAKEPKG_OPTS[@]}
|
||||
|
||||
|
|
Loading…
Reference in a new issue