mirror of
https://github.com/luzifer-docker/arch-repo-builder.git
synced 2024-12-29 21:41:16 +00:00
Add optional package signing
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
eb297d90ce
commit
0f0ac05107
2 changed files with 8 additions and 2 deletions
|
@ -14,7 +14,7 @@ RUN set -ex \
|
|||
/usr/local/bin/dumb-init \
|
||||
/usr/local/bin/gosu
|
||||
|
||||
VOLUME ["/src", "/repo"]
|
||||
VOLUME ["/src", "/repo", "/config"]
|
||||
WORKDIR /src
|
||||
|
||||
COPY run.sh /usr/local/bin/
|
||||
|
|
8
run.sh
8
run.sh
|
@ -2,6 +2,7 @@
|
|||
set -euxo pipefail
|
||||
|
||||
SRC=${1:-}
|
||||
MAKEPKG_OPTS=(-cCs --noconfirm --needed)
|
||||
|
||||
# Override WORKDIR
|
||||
cd /src
|
||||
|
@ -19,11 +20,16 @@ if [ ! -e PKGBUILD ]; then
|
|||
cd /src/git
|
||||
fi
|
||||
|
||||
[ -e /config/signing.asc ] && {
|
||||
gosu builder gpg --import </config/signing.asc
|
||||
MAKEPKG_OPTS+=(--sign)
|
||||
}
|
||||
|
||||
# Update pacman index
|
||||
pacman -Sy
|
||||
|
||||
# Execute the build itself
|
||||
gosu builder makepkg -cCs --noconfirm --needed
|
||||
gosu builder makepkg ${MAKEPKG_OPTS[@]}
|
||||
|
||||
PACKAGE=$(ls *.pkg.*) # This should be only one file
|
||||
|
||||
|
|
Loading…
Reference in a new issue