diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f552fd2583..49a37bb00d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,6 +49,13 @@ jobs: else echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV fi + if [[ "${{ matrix.image_flavor }}" =~ "asus" ]]; then + echo "AKMODS_FLAVOR=asus" >> $GITHUB_ENV + elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then + echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV + else + echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV + fi - name: Generate tags id: generate-tags @@ -126,6 +133,7 @@ jobs: IMAGE_FLAVOR=${{ matrix.image_flavor }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} TARGET_BASE=${{ matrix.target_base }} + AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} labels: ${{ steps.meta.outputs.labels }} oci: false # TODO(GH-280) diff --git a/Containerfile b/Containerfile index 5b4c9a16493..61709fc2333 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,6 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-silverblue}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}" +ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-main}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}" @@ -10,8 +11,9 @@ FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin ARG IMAGE_NAME="${IMAGE_NAME}" ARG IMAGE_VENDOR="ublue-os" -ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" +ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" +ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG PACKAGE_LIST="bluefin" @@ -25,9 +27,8 @@ COPY image-info.sh /tmp/image-info.sh COPY usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml # Add ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion -COPY --from=ghcr.io/ublue-os/akmods:main-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms -RUN if [[ "${IMAGE_FLAVOR}" = "main" || "${IMAGE_NAME}" = "nvidia" ]]; then \ - sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ +COPY --from=ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms +RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then \ rpm-ostree install \ @@ -43,8 +44,7 @@ RUN if [[ "${IMAGE_FLAVOR}" = "main" || "${IMAGE_NAME}" = "nvidia" ]]; then \ ; fi && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ mkdir -p /etc/akmods-rpms/ && \ - mv /tmp/akmods-rpms/kmods/*steamdeck*.rpm /etc/akmods-rpms/steamdeck.rpm \ -; fi + mv /tmp/akmods-rpms/kmods/*steamdeck*.rpm /etc/akmods-rpms/steamdeck.rpm # GNOME VRR RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/gnome-vrr/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-gnome-vrr-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \