2022-03-04 21:49:21 +01:00
|
|
|
branches: master
|
2022-03-05 10:32:31 +01:00
|
|
|
platform: linux/amd64
|
2022-03-04 21:49:21 +01:00
|
|
|
|
|
|
|
when:
|
|
|
|
event: push
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
image: 'archlinux:latest'
|
|
|
|
commands:
|
|
|
|
# Update packages
|
|
|
|
- pacman -Syu --needed --noconfirm base-devel
|
|
|
|
# Create non-root user to perform build & switch to their home
|
|
|
|
- groupadd -g 1000 builder
|
|
|
|
- useradd -mg builder builder
|
|
|
|
- chown -R builder:builder "$PWD"
|
|
|
|
- "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
|
|
|
|
- su builder
|
|
|
|
# Build the package
|
|
|
|
- MAKEFLAGS="-j$(nproc)" makepkg -s --noconfirm --needed
|
|
|
|
|
|
|
|
publish:
|
|
|
|
image: 'archlinux:latest'
|
|
|
|
commands:
|
|
|
|
# Publish the package
|
|
|
|
- 'curl -s -XPOST -H "X-API-KEY: $API_KEY" -T "$(ls *.pkg*)" https://arch.r8r.be/publish'
|
|
|
|
secrets:
|
|
|
|
- api_key
|