diff --git a/.github/workflows/build-gnome.yml b/.github/workflows/build-gnome.yml index 1dba8e4..5a6fe21 100644 --- a/.github/workflows/build-gnome.yml +++ b/.github/workflows/build-gnome.yml @@ -19,6 +19,17 @@ env: IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit jobs: + get_pkg_lists: + name: Retrieve group package lists from fedora:latest dnf group list + runs-on: ubuntu-latest + container: fedora:latest + outputs: + GROUP_PKGS: ${{ steps.get_pkg_list.outputs.result }} + steps: + - id: get_pkg_list + run: | + echo result=$((dnf group info "C Development Tools and Libraries" && dnf group info "Development Tools") | grep -v : | tr -d '\n' | tr -s ' ' | cut -c2-) > "$GITHUB_OUTPUT" + build_push: name: Build and push image runs-on: ubuntu-24.04 @@ -108,6 +119,8 @@ jobs: # Postfix image name with -custom to make it a little more descriptive # Syntax: https://docs.github.com/en/actions/learn-github-actions/expressions#format image: ${{ env.MY_IMAGE_NAME }} + build-args: | + GROUP_PKGS=${{ env.GROUP_PKGS }} tags: | ${{ steps.generate-tags.outputs.alias_tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Containerfile b/Containerfile index 1547d77..f47d176 100644 --- a/Containerfile +++ b/Containerfile @@ -50,6 +50,8 @@ FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${FEDORA_VERSION} COPY build.sh /tmp/build.sh +ARG GROUP_PKGS + RUN mkdir -p /var/lib/alternatives && \ /tmp/build.sh && \ ostree container commit diff --git a/build.sh b/build.sh index f603387..2b6a7e0 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,7 @@ #!/bin/sh -set -ouex pipefail +set -oex pipefail +set +u RELEASE="$(rpm -E %fedora)" @@ -36,9 +37,12 @@ rpm-ostree install \ alsa-tools \ libappstream-glib \ htop \ - glances \ - task + glances +# from dnf groups (specify in build.yml) +if [ -n "$GROUP_PKGS"]; then + rpm-ostree install $GROUP_PKGS +fi # from rpmfusion rpm-ostree install vlc