jjr-joplin/.woodpecker.yml

23 lines
706 B
YAML
Raw Normal View History

2021-12-31 14:39:49 +01:00
pipeline:
build:
image: 'archlinux:latest'
commands:
2021-12-31 14:48:32 +01:00
# Update packages
2021-12-31 14:51:28 +01:00
- pacman -Syu --needed --noconfirm base-devel
2021-12-31 14:48:32 +01:00
# Create non-root user to perform build & switch to their home
- groupadd -g 1000 builder
- useradd -mg builder builder
2022-01-02 12:23:59 +01:00
- 'chown -R builder:builder "$PWD"'
2021-12-31 14:56:12 +01:00
- "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
2021-12-31 14:51:28 +01:00
- su builder
2021-12-31 14:48:32 +01:00
# Build the package
2022-01-02 13:47:29 +01:00
- makepkg -s --noconfirm --needed
2021-12-31 15:06:22 +01:00
publish:
image: 'archlinux:latest'
2022-02-13 12:53:56 +01:00
secrets:
- api_key
2021-12-31 15:06:22 +01:00
commands:
2021-12-31 14:48:32 +01:00
# Publish the package
- 'for pkg in $(ls -1 *.pkg*); do curl -XPOST -T "${pkg}" -H "X-API-KEY: $API_KEY" https://arch.r8r.be/publish; done'