st/.woodpecker.yml

34 lines
814 B
YAML
Raw Normal View History

2022-04-07 21:15:30 +02:00
matrix:
PLATFORM:
- linux/amd64
- linux/arm64
2022-01-02 11:02:36 +01:00
branches: master
2022-04-07 21:15:30 +02:00
platform: ${PLATFORM}
2022-01-02 11:02:36 +01:00
2022-01-02 11:00:02 +01:00
when:
event: push
pipeline:
build:
2022-04-07 21:15:30 +02:00
image: 'menci/archlinuxarm:base-devel'
2022-01-02 11:00:02 +01:00
commands:
# Update packages
2022-04-07 21:15:30 +02:00
- pacman -Syu --noconfirm
2022-01-02 11:00:02 +01:00
# 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
2022-04-07 21:15:30 +02:00
- 'curl -s -XPOST -H "X-API-KEY: $API_KEY" -T "$(ls *.pkg*)" https://arch.r8r.be/jjr/publish'
2022-01-02 11:00:02 +01:00
secrets:
- api_key