aur/.drone.yml
nyyu 8b0b9d8cf8
All checks were successful
continuous-integration/drone/push Build is passing
always pull image
2021-08-02 19:34:44 +02:00

34 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
pull: true
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 jq --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