sign package
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
nyyu 2021-05-19 16:41:48 +02:00
parent 0aaf5970a8
commit 7e4dd616bb
2 changed files with 9 additions and 4 deletions

View file

@ -15,10 +15,15 @@ steps:
- useradd build -m - useradd build -m
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" - "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- chown -R build:build . - chown -R build:build .
- sudo -u build --preserve-env=PGP_KEY sh -c 'echo "$PGP_KEY" | gpg --import --no-tty --batch --yes && ./build.sh' - sudo -u build --preserve-env=PGP_KEY --preserve-env=PGP_PWD --preserve-env=PGP_ID sh -c 'mkdir ~/.gnupg && echo -e "default-cache-ttl 3600\nallow-preset-passphrase" > ~/.gnupg/gpg-agent.conf && echo "$PGP_KEY" | gpg --import --no-tty --batch --yes && echo "$PGP_PWD" | /usr/lib/gnupg/gpg-preset-passphrase --preset $PGP_ID'
- sudo -u build sh -c './build.sh'
environment: environment:
PGP_KEY: PGP_KEY:
from_secret: PGP_KEY from_secret: PGP_KEY
PGP_PWD:
from_secret: PGP_PWD
PGP_ID:
from_secret: PGP_ID
volumes: volumes:
- name: repo - name: repo
host: host:

View file

@ -14,10 +14,10 @@ build() {
fi fi
if ! compgen -G "/repo/$name-$epoch$ver-$rel-*.pkg.tar.zst" > /dev/null ; then if ! compgen -G "/repo/$name-$epoch$ver-$rel-*.pkg.tar.zst" > /dev/null ; then
if makepkg -s --skippgpcheck --noconfirm || makepkg -s --skippgpcheck --nocheck --noconfirm ; then if makepkg -s --skippgpcheck --noconfirm --sign || makepkg -s --skippgpcheck --nocheck --noconfirm --sign ; then
for pkg in *.pkg.tar.zst ; do for pkg in *.pkg.tar.zst ; do
cp "$pkg" /repo/ cp "$pkg"{,.sig} /repo/
repo-add /repo/nyyu.db.tar.zst /repo/"$pkg" repo-add -s /repo/nyyu.db.tar.zst /repo/"$pkg"
done done
fi fi
fi fi