From 5fe040103149eaabffcaf6810e572b1de3a04130 Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Thu, 8 Feb 2024 17:38:30 -0600 Subject: [PATCH] test pushing images to ghcr --- .github/workflows/build.yml | 2 +- Containerfile | 154 ++++++++++++++++++------------------ Containerfile_backup | 97 +++++++++++++++++++++++ 3 files changed, 175 insertions(+), 78 deletions(-) create mode 100644 Containerfile_backup diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4f18bf..5116ba6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-wor workflow_dispatch: env: - IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + IMAGE_REGISTRY: ghcr.io/${{ github.actor }} # Only deploys the branch named "live". Ignores all other branches, to allow # having "development" branches without interfering with GHCR image uploads. diff --git a/Containerfile b/Containerfile index 61d44a3..586f132 100644 --- a/Containerfile +++ b/Containerfile @@ -3,95 +3,95 @@ ARG BASE_IMAGE_URL=quay.io/fedora-ostree-desktops/base FROM registry.fedoraproject.org/fedora:${IMAGE_MAJOR_VERSION} AS cosmic-builder -RUN dnf update -y -RUN dnf install -y git \ - make \ - which \ - just \ - rustc \ - libglvnd-devel \ - libseat-devel \ - libxkbcommon-devel \ - lld \ - libinput-devel \ - glib2-devel \ - gtk3-devel \ - dbus-devel \ - wayland-devel \ - clang-devel \ - cargo \ - mesa-libgbm-devel \ - pipewire-devel \ - pam-devel \ - flatpak-devel -RUN git clone --recurse-submodules https://github.com/pop-os/cosmic-epoch -RUN cd cosmic-epoch && just sysext && rm -rf cosmic-sysext/usr/lib/extension-release.d +# RUN dnf update -y +# RUN dnf install -y git \ +# make \ +# which \ +# just \ +# rustc \ +# libglvnd-devel \ +# libseat-devel \ +# libxkbcommon-devel \ +# lld \ +# libinput-devel \ +# glib2-devel \ +# gtk3-devel \ +# dbus-devel \ +# wayland-devel \ +# clang-devel \ +# cargo \ +# mesa-libgbm-devel \ +# pipewire-devel \ +# pam-devel \ +# flatpak-devel +# RUN git clone --recurse-submodules https://github.com/pop-os/cosmic-epoch +# RUN cd cosmic-epoch && just sysext && rm -rf cosmic-sysext/usr/lib/extension-release.d FROM registry.fedoraproject.org/fedora:${IMAGE_MAJOR_VERSION} AS launcher-builder -RUN dnf update -y -RUN dnf install -y git \ - just \ - rustc \ - cargo \ - libglvnd-devel \ - libxkbcommon-devel -RUN git clone --recurse-submodules https://github.com/pop-os/launcher -RUN cd launcher && just build-release +# RUN dnf update -y +# RUN dnf install -y git \ +# just \ +# rustc \ +# cargo \ +# libglvnd-devel \ +# libxkbcommon-devel +# RUN git clone --recurse-submodules https://github.com/pop-os/launcher +# RUN cd launcher && just build-release FROM registry.fedoraproject.org/fedora:${IMAGE_MAJOR_VERSION} AS wallpapers-builder -RUN dnf update -y -RUN dnf install -y git -RUN git clone --recurse-submodules https://github.com/pop-os/system76-wallpapers +# RUN dnf update -y +# RUN dnf install -y git +# RUN git clone --recurse-submodules https://github.com/pop-os/system76-wallpapers FROM ${BASE_IMAGE_URL}:${IMAGE_MAJOR_VERSION} -# Cosmic dependencies -RUN rpm-ostree install \ - libseat \ - pop-icon-theme \ - greetd \ - greetd-selinux \ - cage \ - mozilla-fira-mono-fonts \ - mozilla-fira-sans-fonts - -# Copy COSMIC -COPY --from=cosmic-builder /cosmic-epoch/cosmic-sysext/usr /usr -COPY --from=cosmic-builder /cosmic-epoch/cosmic-comp/config.ron /usr/etc/cosmic-comp/config.ron -COPY --from=cosmic-builder /cosmic-epoch/cosmic-greeter/cosmic-greeter.toml /usr/etc/greetd/cosmic-greeter.toml -COPY --from=cosmic-builder /cosmic-epoch/cosmic-greeter/debian/cosmic-greeter.service /usr/lib/systemd/system/cosmic-greeter.service - -COPY --from=launcher-builder /launcher/target/release/pop-launcher-bin /usr/bin/pop-launcher -COPY --from=launcher-builder /launcher/plugins/src/calc/plugin.ron /usr/lib/pop-launcher/plugins/calc/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/calc/calc -COPY --from=launcher-builder /launcher/plugins/src/cosmic_toplevel/plugin.ron /usr/lib/pop-launcher/plugins/cosmic_toplevel/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/cosmic_toplevel/cosmic-toplevel -COPY --from=launcher-builder /launcher/plugins/src/desktop_entries/plugin.ron /usr/lib/pop-launcher/plugins/desktop_entries/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/desktop_entries/desktop-entries -COPY --from=launcher-builder /launcher/plugins/src/files/plugin.ron /usr/lib/pop-launcher/plugins/files/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/files/files -COPY --from=launcher-builder /launcher/plugins/src/find/plugin.ron /usr/lib/pop-launcher/plugins/find/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/find/find -COPY --from=launcher-builder /launcher/plugins/src/pulse/plugin.ron /usr/lib/pop-launcher/plugins/pulse/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/pulse/pulse -COPY --from=launcher-builder /launcher/plugins/src/recent/plugin.ron /usr/lib/pop-launcher/plugins/recent/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/recent/recent -COPY --from=launcher-builder /launcher/plugins/src/scripts/plugin.ron /usr/lib/pop-launcher/plugins/scripts/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/scripts/scripts -COPY --from=launcher-builder /launcher/plugins/src/terminal/plugin.ron /usr/lib/pop-launcher/plugins/terminal/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/terminal/terminal -COPY --from=launcher-builder /launcher/plugins/src/web/plugin.ron /usr/lib/pop-launcher/plugins/web/plugin.ron -RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/web/web - -COPY --from=wallpapers-builder /system76-wallpapers/backgrounds /usr/share/backgrounds/pop - -RUN ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service -RUN rm -rf /var/lib/greetd +# # Cosmic dependencies +# RUN rpm-ostree install \ +# libseat \ +# pop-icon-theme \ +# greetd \ +# greetd-selinux \ +# cage \ +# mozilla-fira-mono-fonts \ +# mozilla-fira-sans-fonts + +# # Copy COSMIC +# COPY --from=cosmic-builder /cosmic-epoch/cosmic-sysext/usr /usr +# COPY --from=cosmic-builder /cosmic-epoch/cosmic-comp/config.ron /usr/etc/cosmic-comp/config.ron +# COPY --from=cosmic-builder /cosmic-epoch/cosmic-greeter/cosmic-greeter.toml /usr/etc/greetd/cosmic-greeter.toml +# COPY --from=cosmic-builder /cosmic-epoch/cosmic-greeter/debian/cosmic-greeter.service /usr/lib/systemd/system/cosmic-greeter.service + +# COPY --from=launcher-builder /launcher/target/release/pop-launcher-bin /usr/bin/pop-launcher +# COPY --from=launcher-builder /launcher/plugins/src/calc/plugin.ron /usr/lib/pop-launcher/plugins/calc/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/calc/calc +# COPY --from=launcher-builder /launcher/plugins/src/cosmic_toplevel/plugin.ron /usr/lib/pop-launcher/plugins/cosmic_toplevel/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/cosmic_toplevel/cosmic-toplevel +# COPY --from=launcher-builder /launcher/plugins/src/desktop_entries/plugin.ron /usr/lib/pop-launcher/plugins/desktop_entries/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/desktop_entries/desktop-entries +# COPY --from=launcher-builder /launcher/plugins/src/files/plugin.ron /usr/lib/pop-launcher/plugins/files/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/files/files +# COPY --from=launcher-builder /launcher/plugins/src/find/plugin.ron /usr/lib/pop-launcher/plugins/find/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/find/find +# COPY --from=launcher-builder /launcher/plugins/src/pulse/plugin.ron /usr/lib/pop-launcher/plugins/pulse/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/pulse/pulse +# COPY --from=launcher-builder /launcher/plugins/src/recent/plugin.ron /usr/lib/pop-launcher/plugins/recent/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/recent/recent +# COPY --from=launcher-builder /launcher/plugins/src/scripts/plugin.ron /usr/lib/pop-launcher/plugins/scripts/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/scripts/scripts +# COPY --from=launcher-builder /launcher/plugins/src/terminal/plugin.ron /usr/lib/pop-launcher/plugins/terminal/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/terminal/terminal +# COPY --from=launcher-builder /launcher/plugins/src/web/plugin.ron /usr/lib/pop-launcher/plugins/web/plugin.ron +# RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/web/web + +# COPY --from=wallpapers-builder /system76-wallpapers/backgrounds /usr/share/backgrounds/pop + +# RUN ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service +# RUN rm -rf /var/lib/greetd RUN rpm-ostree cleanup -m && ostree container commit diff --git a/Containerfile_backup b/Containerfile_backup new file mode 100644 index 0000000..61d44a3 --- /dev/null +++ b/Containerfile_backup @@ -0,0 +1,97 @@ +ARG IMAGE_MAJOR_VERSION=39 +ARG BASE_IMAGE_URL=quay.io/fedora-ostree-desktops/base + +FROM registry.fedoraproject.org/fedora:${IMAGE_MAJOR_VERSION} AS cosmic-builder + +RUN dnf update -y +RUN dnf install -y git \ + make \ + which \ + just \ + rustc \ + libglvnd-devel \ + libseat-devel \ + libxkbcommon-devel \ + lld \ + libinput-devel \ + glib2-devel \ + gtk3-devel \ + dbus-devel \ + wayland-devel \ + clang-devel \ + cargo \ + mesa-libgbm-devel \ + pipewire-devel \ + pam-devel \ + flatpak-devel +RUN git clone --recurse-submodules https://github.com/pop-os/cosmic-epoch +RUN cd cosmic-epoch && just sysext && rm -rf cosmic-sysext/usr/lib/extension-release.d + + +FROM registry.fedoraproject.org/fedora:${IMAGE_MAJOR_VERSION} AS launcher-builder + +RUN dnf update -y +RUN dnf install -y git \ + just \ + rustc \ + cargo \ + libglvnd-devel \ + libxkbcommon-devel +RUN git clone --recurse-submodules https://github.com/pop-os/launcher +RUN cd launcher && just build-release + + +FROM registry.fedoraproject.org/fedora:${IMAGE_MAJOR_VERSION} AS wallpapers-builder +RUN dnf update -y +RUN dnf install -y git +RUN git clone --recurse-submodules https://github.com/pop-os/system76-wallpapers + + +FROM ${BASE_IMAGE_URL}:${IMAGE_MAJOR_VERSION} + + +# Cosmic dependencies +RUN rpm-ostree install \ + libseat \ + pop-icon-theme \ + greetd \ + greetd-selinux \ + cage \ + mozilla-fira-mono-fonts \ + mozilla-fira-sans-fonts + +# Copy COSMIC +COPY --from=cosmic-builder /cosmic-epoch/cosmic-sysext/usr /usr +COPY --from=cosmic-builder /cosmic-epoch/cosmic-comp/config.ron /usr/etc/cosmic-comp/config.ron +COPY --from=cosmic-builder /cosmic-epoch/cosmic-greeter/cosmic-greeter.toml /usr/etc/greetd/cosmic-greeter.toml +COPY --from=cosmic-builder /cosmic-epoch/cosmic-greeter/debian/cosmic-greeter.service /usr/lib/systemd/system/cosmic-greeter.service + +COPY --from=launcher-builder /launcher/target/release/pop-launcher-bin /usr/bin/pop-launcher +COPY --from=launcher-builder /launcher/plugins/src/calc/plugin.ron /usr/lib/pop-launcher/plugins/calc/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/calc/calc +COPY --from=launcher-builder /launcher/plugins/src/cosmic_toplevel/plugin.ron /usr/lib/pop-launcher/plugins/cosmic_toplevel/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/cosmic_toplevel/cosmic-toplevel +COPY --from=launcher-builder /launcher/plugins/src/desktop_entries/plugin.ron /usr/lib/pop-launcher/plugins/desktop_entries/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/desktop_entries/desktop-entries +COPY --from=launcher-builder /launcher/plugins/src/files/plugin.ron /usr/lib/pop-launcher/plugins/files/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/files/files +COPY --from=launcher-builder /launcher/plugins/src/find/plugin.ron /usr/lib/pop-launcher/plugins/find/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/find/find +COPY --from=launcher-builder /launcher/plugins/src/pulse/plugin.ron /usr/lib/pop-launcher/plugins/pulse/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/pulse/pulse +COPY --from=launcher-builder /launcher/plugins/src/recent/plugin.ron /usr/lib/pop-launcher/plugins/recent/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/recent/recent +COPY --from=launcher-builder /launcher/plugins/src/scripts/plugin.ron /usr/lib/pop-launcher/plugins/scripts/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/scripts/scripts +COPY --from=launcher-builder /launcher/plugins/src/terminal/plugin.ron /usr/lib/pop-launcher/plugins/terminal/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/terminal/terminal +COPY --from=launcher-builder /launcher/plugins/src/web/plugin.ron /usr/lib/pop-launcher/plugins/web/plugin.ron +RUN ln -s /usr/bin/pop-launcher /usr/lib/pop-launcher/plugins/web/web + +COPY --from=wallpapers-builder /system76-wallpapers/backgrounds /usr/share/backgrounds/pop + +RUN ln -s /usr/lib/systemd/system/cosmic-greeter.service /etc/systemd/system/display-manager.service +RUN rm -rf /var/lib/greetd + +RUN rpm-ostree cleanup -m && ostree container commit +