forked from raphaelscholle/OpenHD-imager
-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (44 loc) · 1.31 KB
/
archlinux.yml
File metadata and controls
52 lines (44 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: OpenHD Image Writer Arch
on:
push:
branches:
- "debug"
- "dev-release"
- "release"
- "2.0.4"
jobs:
build:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Initialise environment
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel git sudo
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up build user (non-root for makepkg)
run: |
useradd -m builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
chown -R builder:builder .
# Required for makepkg to run without prompt
echo 'PACKAGER="OpenHD Builder <builder@openhdfpv.org>"' >> /etc/makepkg.conf
echo 'MAKEFLAGS="-j$(nproc)"' >> /etc/makepkg.conf
- name: Build package
run: |
sudo -u builder bash -c "
cd ${GITHUB_WORKSPACE}
makepkg -sfc --noconfirm
"
- name: Upload Arch package
uses: actions/upload-artifact@v4
with:
name: "OpenHD Image Writer Arch"
path: |
*.pkg.tar.zst
if-no-files-found: error