Files
linux-t2-patches/.github/workflows/BuildKernelPackage.yml
T
2021-12-24 18:44:59 +11:00

52 lines
1.6 KiB
YAML

name: Build Kernel Package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Build In Docker
run: |
cat << EOF > entrypoint.sh
cd /build
useradd builduser -m
passwd -d builduser
pacman -Syu --noconfirm --needed sudo base-devel
printf 'builduser ALL=(ALL) ALL\\n' | tee -a /etc/sudoers
chown -R builduser:builduser ./
sudo -u builduser gpg --keyserver keyserver.ubuntu.com --recv-keys 38DBBDC86092693E
sudo -u builduser bash -c 'export MAKEFLAGS=j\$(nproc) && makepkg -s --noconfirm'
EOF
docker run -t -v $PWD:/build archlinux /bin/bash /build/entrypoint.sh
- name: Print sha512sums
run: sha512sum *.pkg.tar*
- name: Upload Built Packages
uses: actions/upload-artifact@v2
with:
name: built-packages
path: ${{ github.workspace }}/*.pkg.tar.zst
- name: Create Tag
id: create_tag
run: |
source PKGBUILD
echo "::set-output name=tag::${pkgver}-${pkgrel}"
echo $pkgver $pkgrel
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
with:
files: |
${{ github.workspace }}/*.pkg.tar.*
tag_name: v${{ steps.create_tag.outputs.tag }}
draft: false
body: |
Install packages with `sudo pacman -U <file>`, you can use urls or file paths.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}