-
Notifications
You must be signed in to change notification settings - Fork 63
46 lines (39 loc) · 1.25 KB
/
PKGBUILD-buildd.yml
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
# This is a basic workflow to help you get started with Actions
name: Check PKGBUILD builds for Arch.
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
PKGBUILD-build:
container: archlinux:base-devel
runs-on: ubuntu-latest
steps:
- name: Install packages
run: |
pacman-key --init
pacman -Syu --noconfirm
- name: Add builduser
run: |
# Create the builduser
useradd builduser -m
# Delete the buildusers password
passwd -d builduser
# Allow the builduser passwordless sudo
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
- name: Check out sources
uses: actions/checkout@v3
- name: Test PKGBUILD
run: |
build_dir="/tmp/PKGBUILD-git/"
cd build-scripts
mkdir $build_dir
cp ./PKGBUILD-git $build_dir/PKGBUILD
cd $build_dir
sudo chown builduser $build_dir
sudo -H -u builduser bash -c 'makepkg -s --noconfirm'