Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/arch-makepkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Arch Linux Package

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
makepkg:
name: Build with makepkg
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
env:
PKGDEST: ${{ github.workspace }}/pkgdest
SRCDEST: ${{ github.workspace }}/srcdest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare pacman
run: |
pacman-key --init
pacman-key --populate archlinux
pacman -Syu --noconfirm --needed git base-devel sudo gnupg
Comment thread
infeo marked this conversation as resolved.
Outdated
- name: Create build user
run: |
useradd -m builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/builder
Comment thread
infeo marked this conversation as resolved.
chown -R builder:builder "$GITHUB_WORKSPACE"
install -d -m 0755 -o builder -g builder "$PKGDEST" "$SRCDEST"
- name: Import package signing key
run: |
Comment thread
infeo marked this conversation as resolved.
sudo -u builder gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 58117AFA1F85B3EEC154677D615D449FE6E6A235
Comment thread
infeo marked this conversation as resolved.
Outdated
- name: Build package with makepkg
run: |
sudo -u builder env \
PKGDEST="$PKGDEST" \
SRCDEST="$SRCDEST" \
MAKEPKG_FLAGS="--syncdeps --cleanbuild --noconfirm --log" \
bash -lc "makepkg \$MAKEPKG_FLAGS"
Comment thread
infeo marked this conversation as resolved.
Outdated
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: arch-package-${{ github.run_number }}
path: |
${{ env.PKGDEST }}/*.pkg.tar.zst
Comment thread
infeo marked this conversation as resolved.