Skip to content

6.11.3-302.11: Add changelogs #22

6.11.3-302.11: Add changelogs

6.11.3-302.11: Add changelogs #22

Workflow file for this run

name: Build Bazzite Kernel
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
jobs:
build_kernel:
runs-on: ubuntu-24.04
environment: prod
strategy:
fail-fast: false
matrix:
arch: [x86_64]
fedora_version: [40]
steps:
- name: Maximize build space
uses: ublue-os/remove-unwanted-software@v7
- name: Checkout repository
uses: actions/checkout@v4
# - name: Get ccache key
# id: ccache_key
# run: |
# KVER=$(cat kernel.spec | grep -m 1 '%define specversion' | rev | cut -d' ' -f 1 | rev)
# CCACHE_KEY=$KVER-${{ matrix.arch }}-${{ matrix.fedora_version }}
# echo "Ccache key is '$CCACHE_KEY'"
# echo "ccache-key=$CCACHE_KEY" >> $GITHUB_OUTPUT
- name: Create Build Environment
run: |
FEDORA_VERSION="${{ matrix.fedora_version }}"
sudo podman build . --tag 'fedora_builder' \
--build-arg UID=$(id -u) --build-arg GID=$(id -g) \
--build-arg FEDORA_VERSION=${FEDORA_VERSION:-41}
- name: Write Changelog
run: |
sudo podman run --rm -v $(pwd):/workspace fedora_builder \
python3 release_changelog.py
- name: Compile Kernel
run: |
FEDORA_VERSION="${{ matrix.fedora_version }}"
ARCH="${{ matrix.arch }}"
sudo podman run --rm -v $(pwd):/workspace fedora_builder fedpkg \
--name kernel --namespace rpms --release "f${FEDORA_VERSION:-41}" \
local --arch ${ARCH:-x86_64} --with baseonly \
--builddir build --buildrootdir buildroot
- name: Separate debuginfo into different folder
run: |
mkdir -p debuginfo
mv ${{ matrix.arch }}/kernel-debuginfo-*.rpm debuginfo/
- name: Upload Kernel to action
uses: actions/upload-artifact@v4
with:
name: kernel-f${{ matrix.fedora_version}}-${{ matrix.arch }}
path: |
.build-*.log
${{ matrix.arch }}/kernel-*.rpm
compression-level: 7
- name: Upload Kernel debuginfo to action
uses: actions/upload-artifact@v4
with:
name: kernel-f${{ matrix.fedora_version}}-${{ matrix.arch }}-debuginfo
path: |
.build-*.log
debuginfo/*.rpm
compression-level: 7
- name: Convert to Arch
if: matrix.arch == 'x86_64'
run: |
# Grab kernel ver from the log
KERNEL_VER=$(ls -a | grep .build | head -n 1 | sed 's/.build-//' | sed 's/.log//')
ARCH_VER=$(echo $KERNEL_VER | sed 's/-/./g')
# Place in PKGBUILD
cat PKGBUILD | \
sed "s/VERSION_FEDORA/${KERNEL_VER}.x86_64/" | \
sed "s/VERSION_ARCH/${ARCH_VER}/" \
> x86_64/PKGBUILD
sudo podman build . -f Dockerfile-arch --tag 'arch_builder' --build-arg UID=$(id -u) --build-arg GID=$(id -g)
sudo podman run --rm -v $(pwd)/x86_64:/workspace arch_builder makepkg -s
- name: Upload Kernel arch package to action
uses: actions/upload-artifact@v4
if: matrix.arch == 'x86_64'
with:
name: linux-f${{ matrix.fedora_version}}-arch
path: |
x86_64/linux-*.pkg.tar.zst
compression-level: 7
- name: Upload Kernel to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
.build-*.log
${{ matrix.arch }}/kernel-*.rpm
x86_64/linux-*.pkg.tar.zst
make_latest: true
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}