Build Kernel Package #627
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Kernel Package | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Build In Docker | |
if: ${{ !contains(github.event.head_commit.message, '[no build]') }} | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
BUILDUSER=yuukoito | |
BUILDGROUP=yagakimi | |
HOSTNAME=bloom-into-you | |
cat << EOF > entrypoint.sh | |
cd /build | |
groupadd -r $BUILDGROUP | |
useradd $BUILDUSER -g $BUILDGROUP -m | |
passwd -d $BUILDUSER | |
pacman -Syu --noconfirm --needed sudo base-devel git | |
printf '$BUILDUSER ALL=(ALL) ALL\\n' | tee -a /etc/sudoers | |
chown -R $BUILDUSER:$BUILDGROUP ./ | |
sudo -u $BUILDUSER gpg --keyserver keyserver.ubuntu.com --recv-keys 38DBBDC86092693E | |
df -h | |
sudo -u $BUILDUSER bash -c 'export MAKEFLAGS=j\$(nproc) && makepkg -s --noconfirm' | |
df -h | |
EOF | |
docker run -h $HOSTNAME -t -v $PWD:/build archlinux /bin/bash /build/entrypoint.sh | |
- name: Print sha512sums | |
if: ${{ !contains(github.event.head_commit.message, '[no build]') }} | |
run: sha512sum *.pkg.tar.* | |
- name: Upload Built Packages | |
if: ${{ !contains(github.event.head_commit.message, '[no build]') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: built-packages | |
path: ${{ github.workspace }}/*.pkg.tar.* | |
- name: Create Tag | |
if: ${{ !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') && github.event_name != 'pull_request' }} | |
id: create_tag | |
run: | | |
source PKGBUILD | |
echo "tag=${pkgver}" >> $GITHUB_OUTPUT | |
echo $pkgver $pkgrel | |
- name: Release | |
if: ${{ !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') && github.event_name != 'pull_request' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{ github.workspace }}/*.zip | |
${{ github.workspace }}/*.pkg.tar.* | |
tag_name: v${{ steps.create_tag.outputs.tag }} | |
name: ${{ steps.create_tag.outputs.tag }} - Release Yagakimi | |
draft: ${{ contains(github.event.head_commit.message, '[draft]') }} | |
prerelease: ${{ contains(github.event.head_commit.message, '[prerel]') }} | |
body: | | |
This release features Yuu Koito from [Bloom Into You](https://sevenseasentertainment.com/series/bloom-into-you/)! | |
Every major release will feature new anime/manga and minor releases will have different characters! | |
Install packages with `sudo pacman -U <file>`, you can use urls or file paths. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |