mirror of
https://github.com/luzifer-docker/arch-repo-builder.git
synced 2024-10-18 06:44:20 +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/dumb-init \
|
||||||
/usr/local/bin/gosu
|
/usr/local/bin/gosu
|
||||||
|
|
||||||
VOLUME ["/src", "/repo"]
|
VOLUME ["/src", "/repo", "/config"]
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY run.sh /usr/local/bin/
|
COPY run.sh /usr/local/bin/
|
||||||
|
|
8
run.sh
8
run.sh
|
@ -2,6 +2,7 @@
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
SRC=${1:-}
|
SRC=${1:-}
|
||||||
|
MAKEPKG_OPTS=(-cCs --noconfirm --needed)
|
||||||
|
|
||||||
# Override WORKDIR
|
# Override WORKDIR
|
||||||
cd /src
|
cd /src
|
||||||
|
@ -19,11 +20,16 @@ if [ ! -e PKGBUILD ]; then
|
||||||
cd /src/git
|
cd /src/git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -e /config/signing.asc ] && {
|
||||||
|
gosu builder gpg --import </config/signing.asc
|
||||||
|
MAKEPKG_OPTS+=(--sign)
|
||||||
|
}
|
||||||
|
|
||||||
# Update pacman index
|
# Update pacman index
|
||||||
pacman -Sy
|
pacman -Sy
|
||||||
|
|
||||||
# Execute the build itself
|
# Execute the build itself
|
||||||
gosu builder makepkg -cCs --noconfirm --needed
|
gosu builder makepkg ${MAKEPKG_OPTS[@]}
|
||||||
|
|
||||||
PACKAGE=$(ls *.pkg.*) # This should be only one file
|
PACKAGE=$(ls *.pkg.*) # This should be only one file
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue