aur/.drone.yml
nyyu bd8b7a1b56
All checks were successful
continuous-integration/drone/push Build is passing
gitlab image not updated
2021-06-04 07:44:48 +02:00

33 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
image: archlinux:base-devel
volumes:
- name: repo
path: /repo
commands:
- sed -i 's/# REPOSITORIES/[nyyu]\nServer = https:\\/\\/archlinux.nyyu.dev\\/nyyu\nSigLevel = Never/' /etc/pacman.conf
- pacman -Syu git --noconfirm
- mv /etc/pacman.conf.pacnew /etc/pacman.conf
- sed -i 's/# REPOSITORIES/[nyyu]\nServer = https:\\/\\/archlinux.nyyu.dev\\/nyyu\nSigLevel = Never/' /etc/pacman.conf
- sed -i 's/#PACKAGER=".*"/PACKAGER="nyyu <mail@nyyu.dev>"/' /etc/makepkg.conf
- useradd build -m
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- chown -R build:build .
- 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:
PGP_KEY:
from_secret: PGP_KEY
PGP_PWD:
from_secret: PGP_PWD
PGP_ID:
from_secret: PGP_ID
volumes:
- name: repo
host:
path: /mnt/archlinux/nyyu