refactor Caching
build.yml (push) Invalid workflow file

This commit is contained in:
Gunnar committed 2026-11-18 21:21:00 +01:00
1 parent 2f8bf49626
commit c0cbf6e08b
6 files changed
+8 -15

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ RUN --mount=type=bind,from=build-ctx,source=/build/10-repos.sh,target=/tmp/10-re
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/10-repos.sh && dnf5 clean all
bash /tmp/10-repos.sh
# LAYER 2: Unerwünschte Pakete entfernen (Bereinigungsschicht - vorgezogen)
RUN --mount=type=bind,from=build-ctx,source=/build/20-remove-packages.sh,target=/tmp/20-remove-packages.sh \
+1 -3
View File
@@ -21,6 +21,4 @@ cp -n /usr/share/dnf5/repos.d/*.repo /etc/yum.repos.d/ 2>/dev/null || true
# GPG-Keys ebenfalls an den bisherigen Ort spiegeln (DNF4/rpm-ostree).
mkdir -p /etc/pki/rpm-gpg
cp -n /usr/share/pki/rpm-gpg/* /etc/pki/rpm-gpg/ 2>/dev/null || true
dnf5 clean all
cp -n /usr/share/pki/rpm-gpg/* /etc/pki/rpm-gpg/ 2>/dev/null || true
-2
View File
@@ -9,5 +9,3 @@ echo "Removing Firefox and langpacks..."
dnf5 remove -y \
firefox \
firefox-langpacks* || true
dnf5 clean all
-5
View File
@@ -28,8 +28,3 @@ for pkg in distrobox toolbox libva-utils micro fuse fuse-libs fuse3 jq libnotify
echo "WARN: ${pkg} nicht installiert (Repo-/Umbenennungsproblem?)" >&2
fi
done
dnf5 clean all
-2
View File
@@ -34,8 +34,6 @@ for pkg in mesa-va-drivers-freeworld mesa-vulkan-drivers-freeworld ffmpeg \
fi
done
dnf5 clean all
#echo "Installing rocm"
#dnf5 install -y \
# rocm-clinfo \
+6 -2
View File
@@ -49,12 +49,16 @@ Ohne Loeschen deaktivieren:
## Ausfuehrung im Containerfile
```dockerfile
RUN --mount=type=bind,from=ctx,source=/build/10-repos.sh,target=/tmp/10-repos.sh \
RUN --mount=type=bind,from=build-ctx,source=/build/10-repos.sh,target=/tmp/10-repos.sh \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
bash /tmp/10-repos.sh && dnf5 clean all
bash /tmp/10-repos.sh
```
Kein `dnf5 clean all` in den Zwischenlayern: das wuerde den geteilten Cache-Mount
sofort wieder leeren. Die Bereinigung erfolgt einmalig in `99-cleanup.sh`.
## Hinweise
- Scripts laufen als root waehrend des Builds