Add support for defining dnf package groups to install
This commit is contained in:
parent
388fd4f93d
commit
79cc4b6ef0
3 changed files with 22 additions and 3 deletions
13
.github/workflows/build-gnome.yml
vendored
13
.github/workflows/build-gnome.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
10
build.sh
10
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue