Skip to content

Auto Build Arch Packages #373

Auto Build Arch Packages

Auto Build Arch Packages #373

name: Auto Build Arch Packages
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '33 3 3,10,17,24,31 * *'
jobs:
package-build:
name: Build and Upload Packages for PKGBUILD in this repository
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
qemu-user-static git rsync curl gettext libarchive-tools systemd-container build-essential meson \
python3-setuptools pkg-config libarchive-dev libcurl4-openssl-dev bash-completion cmake libgpgme-dev \
libssl-dev
- name: Build and install pacman
env:
PACMAN_VER: 6.0.2
run: |
curl -L https://sources.archlinux.org/other/pacman/pacman-$PACMAN_VER.tar.xz -O
tar x -f pacman-$PACMAN_VER.tar.xz
cd pacman-$PACMAN_VER
meson build
ninja -C build
sudo ninja -C build install
cd ..
rm -rf pacman-$PACMAN_VER pacman-$PACMAN_VER.tar.xz
sudo mkdir -p /etc/pacman.d
echo 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist
- name: Get armutils
run: |
git clone https://gitlab.com/mipimipi/armutils.git
cd armutils/bin
sudo install -Dm755 arm-nspawn /usr/local/bin/arm-nspawn
sudo install -Dm755 makearmpkg /usr/local/bin/makearmpkg
sudo install -Dm755 mkarmchroot /usr/local/bin/mkarmchroot
cd ../..
rm -rf armutils
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: bash start-build.sh
- name: Generare Release info
if: ${{ github.event_name == 'push' }}
id: release-info
run: |
cd out
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "sums<<$EOF" >> "$GITHUB_OUTPUT"
sha256sum *.pkg.tar.* >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
echo date=$(date -I | sed s/-//g) >> "$GITHUB_OUTPUT"
- name: Push to GitHub Releases
if: ${{ github.event_name == 'push' }}
uses: softprops/action-gh-release@v1
with:
draft: false
generate_release_notes: true
prerelease: false
tag_name: ${{ steps.release-info.outputs.date }}
files: "out/*.pkg.tar.*"
name: Raspberry Pi 4 UEFI Boot Packages for Arch Based Linux Distribution
body: |
CI Build for commit ${{ github.sha }}
sha256sums:
```
${{ steps.release-info.outputs.sums }}
```