Skip to content

Commit

Permalink
feat(ci): Build bazzite-deck-nvidia images (These are not ready for a…
Browse files Browse the repository at this point in the history
… stable release. No we can't tell you when they might be) (#2043)
  • Loading branch information
KyleGospo committed Jan 2, 2025
1 parent 31c4831 commit a46d6e6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
fail-fast: false
matrix:
base_image_flavor: [main]
base_name: [bazzite, bazzite-deck, bazzite-nvidia]
base_name: [bazzite, bazzite-deck, bazzite-nvidia, bazzite-deck-nvidia]
base_image_name: [kinoite, silverblue]
target_image_flavor: [main, asus]
target_nvidia_flavor: [nvidia, nvidia-open]
Expand All @@ -77,10 +77,22 @@ jobs:
target_nvidia_flavor: nvidia
- base_name: bazzite-deck
target_nvidia_flavor: nvidia
- base_name: bazzite-deck-nvidia
target_nvidia_flavor: nvidia
- base_name: bazzite-deck-nvidia
target_image_flavor: asus
steps:
- name: Define env.CONTAINER_TARGET
run: |
if [[ "${{ matrix.base_name }}" == "bazzite-deck-nvidia" ]]; then
echo "CONTAINER_TARGET=bazzite-nvidia" >> $GITHUB_ENV
else
echo "CONTAINER_TARGET=${{ matrix.base_name }}" >> $GITHUB_ENV
fi
- name: Define env.IMAGE_FLAVOR
run: |
if [[ "${{ matrix.base_name }}" == "bazzite-nvidia" ]]; then
if [[ "${{ matrix.base_name }}" =~ "nvidia" ]]; then
if [[ "${{ matrix.target_image_flavor }}" == "main" ]]; then
echo "IMAGE_FLAVOR=${{ matrix.target_nvidia_flavor }}" >> $GITHUB_ENV
else
Expand All @@ -103,6 +115,8 @@ jobs:
else
echo "IMAGE_NAME=${{ format('{0}{1}', 'bazzite-deck', '${DESKTOP}') }}" >> $GITHUB_ENV
fi
elif [[ "${{ matrix.base_name }}" == "bazzite-deck-nvidia" ]]; then
echo "IMAGE_NAME=${{ format('{0}{1}', 'bazzite-deck-nvidia', '${DESKTOP}') }}" >> $GITHUB_ENV
else
if [[ "${{ env.IMAGE_FLAVOR }}" == "main" ]]; then
echo "IMAGE_NAME=${{ format('{0}{1}', 'bazzite', '${DESKTOP}') }}" >> $GITHUB_ENV
Expand All @@ -111,6 +125,14 @@ jobs:
fi
fi
- name: Define env.NVIDIA_BASE
run: |
if [[ "${{ matrix.base_name }}" == "bazzite-deck-nvidia" ]]; then
echo "NVIDIA_BASE=bazzite-deck" >> $GITHUB_ENV
else
echo "NVIDIA_BASE=bazzite" >> $GITHUB_ENV
fi
- name: Define env.SHA_HEAD_SHORT
run: |
echo "SHA_HEAD_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
Expand Down Expand Up @@ -230,10 +252,11 @@ jobs:
id: build_image
run: |
sudo buildah build \
--target ${{ matrix.base_name }} \
--target ${{ env.CONTAINER_TARGET }} \
--build-arg IMAGE_NAME=${{ env.IMAGE_NAME }} \
--build-arg IMAGE_FLAVOR=${{ env.IMAGE_FLAVOR }} \
--build-arg NVIDIA_FLAVOR=${{ matrix.target_nvidia_flavor }} \
--build-arg NVIDIA_BASE=${{ env.NVIDIA_BASE }} \
--build-arg IMAGE_VENDOR=${{ github.repository_owner }} \
--build-arg BASE_IMAGE_NAME=${{ matrix.base_image_name }} \
--build-arg BASE_IMAGE_FLAVOR=${{ matrix.base_image_flavor }} \
Expand Down
7 changes: 6 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-kinoite}"
ARG BASE_IMAGE_FLAVOR="${BASE_IMAGE_FLAVOR:-main}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG NVIDIA_FLAVOR="${NVIDIA_FLAVOR:-nvidia}"
ARG NVIDIA_BASE="${NVIDIA_BASE:-bazzite}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-bazzite}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.12.5-204.bazzite.fc41.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
Expand All @@ -23,6 +24,7 @@ ARG IMAGE_NAME="${IMAGE_NAME:-bazzite}"
ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG NVIDIA_FLAVOR="${NVIDIA_FLAVOR:-nvidia}"
ARG NVIDIA_BASE="${NVIDIA_BASE:-bazzite}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-bazzite}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.12.5-204.bazzite.fc41.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
Expand Down Expand Up @@ -829,6 +831,7 @@ ARG IMAGE_NAME="${IMAGE_NAME:-bazzite-deck}"
ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG NVIDIA_FLAVOR="${NVIDIA_FLAVOR:-nvidia}"
ARG NVIDIA_BASE="${NVIDIA_BASE:-bazzite}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-bazzite}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.12.5-204.bazzite.fc41.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
Expand Down Expand Up @@ -995,12 +998,14 @@ RUN /usr/libexec/containerbuild/image-info && \

FROM ghcr.io/ublue-os/akmods-${NVIDIA_FLAVOR}:${KERNEL_FLAVOR}-${FEDORA_MAJOR_VERSION}-${KERNEL_VERSION} AS nvidia-akmods

FROM bazzite AS bazzite-nvidia
FROM ${NVIDIA_BASE} AS bazzite-nvidia

ARG IMAGE_NAME="${IMAGE_NAME:-bazzite-nvidia}"
ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-nvidia}"
ARG NVIDIA_FLAVOR="${NVIDIA_FLAVOR:-nvidia}"
ARG NVIDIA_BASE="${NVIDIA_BASE:-bazzite}"
ARG NVIDIA_NAME=${NVIDIA_NAME:-bazzite-nvidia}
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-bazzite}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.12.5-204.bazzite.fc41.x86_64}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
Expand Down

0 comments on commit a46d6e6

Please sign in to comment.