1
0
Fork 0
ostree-native-containers/.forgejo/workflows/build-image.yaml
ver4a 91953586e2
Some checks failed
/ build-kde (push) Failing after 6s
/ build-gnome (push) Failing after 3s
Build dnf5 cache and share it among builds (fedora repos)
Before this all of the builds had to redownload all metadata, currently
this is only done for fedora repositories and not rpmfusion, but that
will most likely change when I think of an elegant solution to the
problem of not having rpmfusion repositories in the official minimal
image..
2024-11-16 23:38:40 +01:00

45 lines
3.7 KiB
YAML

on:
push:
schedule:
- cron: '0 5 * * *'
jobs:
build-kde:
runs-on: shell
steps:
- uses: actions/checkout@v4
- run: cd ${{ env.GITHUB_WORKSPACE }}
- run: podman login -u ${{ vars.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_DOMAIN }}
# Prepare dnf5 metadata cache (fedora repos, rpmfusion will come later)
- run: podman run --replace --rm --pull=always --name kde-dnf-makecache -v ./cache:/var/cache/libdnf5:z registry.fedoraproject.org/fedora-minimal:41 dnf5 makecache
# base
- run: podman build . -f Dockerfile.kde --no-cache --pull=always -v ./cache:/var/cache/libdnf5:O --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main
# base + nvidia
- run: podman build . -f Dockerfile.kde-nvidia --no-cache --pull=never -v ./cache:/var/cache/libdnf5:O --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia
# base + nvidia + ver4a's configuration
- run: podman build . -f Dockerfile.kde-nvidia-ver4a --no-cache --pull=never -v ./cache:/var/cache/libdnf5:O --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia-ver4a
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia-ver4a ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia-ver4a
- if: '!cancelled()'
run: >
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main && podman image prune -f &&
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia && podman image prune -f &&
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-kde:main-nvidia-ver4a && podman image prune -f
build-gnome:
runs-on: shell
steps:
- uses: actions/checkout@v4
- run: cd ${{ env.GITHUB_WORKSPACE }}
- run: podman login -u ${{ vars.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_DOMAIN }}
# Prepare dnf5 metadata cache (fedora repos, rpmfusion will come later)$
- run: podman run --replace --rm --pull=always --name gnome-dnf-makecache -v ./cache:/var/cache/libdnf5:z registry.fedoraproject.org/fedora-minimal:41 dnf5 makecache
# base
- run: podman build . -f Dockerfile.gnome --no-cache --pull=always -v ./cache:/var/cache/libdnf5:O --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main
# base + nvidia
- run: podman build . -f Dockerfile.gnome-nvidia --no-cache --pull=never -v ./cache:/var/cache/libdnf5:O --squash -t ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia
- run: podman push --compression-format=zstd:chunked --compression-level=${{ vars.COMPRESSION_LEVEL }} ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia
- if: '!cancelled()'
run: >
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main && podman image prune -f &&
podman image rm -f ${{ vars.REGISTRY_DOMAIN }}/ver4a/onc-gnome:main-nvidia && podman image prune -f