From c47b6f4265c7cbe3e90ce09afb6dac86615dcbd0 Mon Sep 17 00:00:00 2001 From: ManInDark <61268856+ManInDark@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:18:10 +0100 Subject: [PATCH] FEAT: add hyprland container --- .github/workflows/build.yml | 13 ++++++++++--- Containerfile | 4 +++- Makefile | 5 ++++- build_files/02_hyprland.sh | 6 ++++++ 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100755 build_files/02_hyprland.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 845aab5..e793b85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,11 @@ jobs: build_push: name: Build and push image runs-on: ubuntu-24.04 + strategy: + matrix: + desktop_environment: + - gnome + - hyprland permissions: contents: read @@ -62,8 +67,8 @@ jobs: id: metadata with: tags: | - type=raw,value=${{ github.ref_name }}.${{ env.DEFAULT_TAG }} - type=raw,value=${{ github.ref_name }}.{{date 'YYYYMMDD-HHmm'}} + type=raw,value=${{ github.ref_name }}.${{ matrix.desktop_environment }}.${{ env.DEFAULT_TAG }} + type=raw,value=${{ github.ref_name }}.${{ matrix.desktop_environment }}.{{date 'YYYYMMDD-HHmm'}} type=sha,enable=${{ github.event_name == 'pull_request' }} type=ref,event=pr labels: | @@ -75,7 +80,7 @@ jobs: org.opencontainers.image.title=${{ env.IMAGE_NAME }} org.opencontainers.image.url=https://github.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/tree/${{ github.sha }} org.opencontainers.image.vendor=${{ github.repository_owner }} - org.opencontainers.image.version=${{ github.ref_name }}.{{date 'YYYYMMDD-HHmm'}} + org.opencontainers.image.version=${{ github.ref_name }}.${{ matrix.desktop_environment }}.{{date 'YYYYMMDD-HHmm'}} io.artifacthub.package.deprecated=false io.artifacthub.package.keywords=${{ env.IMAGE_KEYWORDS }} io.artifacthub.package.license=Apache-2.0 @@ -95,6 +100,8 @@ jobs: tags: ${{ steps.metadata.outputs.tags }} labels: ${{ steps.metadata.outputs.labels }} oci: false + build-args: | + DESKTOP_ENVIRONMENT=${{ matrix.desktop_environment }} - name: Login to GitHub Container Registry uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 diff --git a/Containerfile b/Containerfile index 525847f..4e87098 100644 --- a/Containerfile +++ b/Containerfile @@ -24,11 +24,13 @@ RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=tmpfs,dst=/tmp \ /ctx/01_pre_desktop.sh +ARG DESKTOP_ENVIRONMENT="gnome" + RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ - /ctx/02_gnome.sh + /ctx/02_${DESKTOP_ENVIRONMENT}.sh RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=cache,dst=/var/cache \ diff --git a/Makefile b/Makefile index fc061df..0801888 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ clean: sudo rm -fr flathub output output-repo sudo podman system prune - for container in $$(sudo podman container list --external --format "{{.ID}}"); do sudo podman rm $$container; done + for container in $$(sudo podman container list --external --format "{{.ID}}"); do sudo podman rm --force $$container; done oci: sudo podman build --network=host -t podman-image . +oci_hyprland: + sudo podman build --network=host -t podman-image-hyprland --build-arg DESKTOP_ENVIRONMENT=hyprland . + CONTAINER_IMAGE=localhost/podman-image FILESYSTEM_TYPE=ext4 qcow: diff --git a/build_files/02_hyprland.sh b/build_files/02_hyprland.sh new file mode 100755 index 0000000..7b51089 --- /dev/null +++ b/build_files/02_hyprland.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -ouex pipefail + +dnf5 copr enable -y solopasha/hyprland +dnf5 install -y hyprland \ No newline at end of file