From 637427b3a9b40d63aa4234a1b934ced4d2ed7c27 Mon Sep 17 00:00:00 2001 From: Sneexy Date: Tue, 2 Apr 2024 23:15:57 -0500 Subject: [PATCH] feat: add google chrome toolboxes and fix badges in readme --- .../workflows/build-google-chrome-toolbox.yml | 108 ++++++++++++++++++ README.md | 2 +- .../Containerfile.ubuntu | 24 ++++ .../google-chrome-toolbox/packages.ubuntu | 89 +++++++++++++++ 4 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-google-chrome-toolbox.yml create mode 100644 toolboxes/google-chrome-toolbox/Containerfile.ubuntu create mode 100644 toolboxes/google-chrome-toolbox/packages.ubuntu diff --git a/.github/workflows/build-google-chrome-toolbox.yml b/.github/workflows/build-google-chrome-toolbox.yml new file mode 100644 index 0000000..38d5e47 --- /dev/null +++ b/.github/workflows/build-google-chrome-toolbox.yml @@ -0,0 +1,108 @@ +name: Build Ubuntu Toolbox (Sernik) Image +on: + schedule: + - cron: '20 22 * * *' # 10:20pm everyday + pull_request: + merge_group: + workflow_dispatch: +env: + IMAGE_NAME: ubuntu-toolbox + IMAGE_TAGS: latest + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + push-ghcr: + name: Build and push image + runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + id-token: write + strategy: + fail-fast: false + steps: + # Checkout push-to-registry action GitHub repository + - name: Checkout Push to Registry action + uses: actions/checkout@v4 + + - name: Verify Ubuntu toolbox + uses: EyeCantCU/cosign-action/verify@v0.2.2 + with: + containers: ubuntu-toolbox:22.04 + pubkey: https://raw.githubusercontent.com/toolbx-images/images/main/quay.io-toolbx-images.pub + registry: quay.io/toolbx-images + + # Build metadata + - name: Image Metadata + uses: docker/metadata-action@v5 + id: meta + with: + images: | + ${{ env.IMAGE_NAME }} + labels: | + io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/boxkit/main/README.md + + # Build image using Buildah action + - name: Build Image + id: build_image + uses: redhat-actions/buildah-build@v2 + with: + containerfiles: | + ./toolboxes/ubuntu-toolbox/Containerfile.ubuntu + image: ${{ env.IMAGE_NAME }} + tags: ${{ env.IMAGE_TAGS }} + labels: ${{ steps.meta.outputs.labels }} + oci: false + + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. + # https://github.com/macbre/push-to-ghcr/issues/12 + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ env.IMAGE_REGISTRY }} + + # Push the image to GHCR (Image Registry) + - name: Push To GHCR + uses: redhat-actions/push-to-registry@v2 + if: github.event_name != 'pull_request' + id: push + env: + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + with: + image: ${{ steps.build_image.outputs.image }} + tags: ${{ steps.build_image.outputs.tags }} + registry: ${{ steps.registry_case.outputs.lowercase }} + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + if: github.event_name != 'pull_request' + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Sign container + - uses: sigstore/cosign-installer@v3.4.0 + if: github.event_name != 'pull_request' + + - name: Sign container image + if: github.event_name != 'pull_request' + run: | + echo "${{ env.COSIGN_PRIVATE_KEY }}" > cosign.key + wc -c cosign.key + cosign sign -y --key cosign.key ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS} + env: + TAGS: ${{ steps.push.outputs.digest }} + COSIGN_EXPERIMENTAL: false + COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }} + + - name: Echo outputs + run: | + echo "${{ toJSON(steps.push.outputs) }}" diff --git a/README.md b/README.md index 39724c6..278b1ca 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
-[![fedora-sernik](https://github.com/sernik-tech/member-images/actions/workflows/fedora-sernik/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/fedora-sernik.yml) [![ubuntu-sernik](https://github.com/sernik-tech/member-images/actions/workflows/ubuntu-sernik.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/ubuntu-sernik.yml) [![arch-sernik](https://github.com/sernik-tech/member-images/actions/workflows/arch-sernik.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/arch-sernik.yml) [![google-chrome](https://github.com/sernik-tech/member-images/actions/workflows/google-chrome.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/google-chrome.yml) +[![fedora-toolbox](https://github.com/sernik-tech/member-images/actions/workflows/build-fedora-toolbox.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/build-fedora-toolbox.yml) [![ubuntu-toolbox](https://github.com/sernik-tech/member-images/actions/workflows/build-ubuntu-toolbox.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/build-ubuntu-toolbox.yml) [![arch-toolbox](https://github.com/sernik-tech/member-images/actions/workflows/arch-toolbox.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/arch-sernik.yml) [![google-chrome](https://github.com/sernik-tech/member-images/actions/workflows/build-google-chrome-toolbox.yml/badge.svg)](https://github.com/sernik-tech/member-images/actions/workflows/build-google-chrome-toolbox.yml)
diff --git a/toolboxes/google-chrome-toolbox/Containerfile.ubuntu b/toolboxes/google-chrome-toolbox/Containerfile.ubuntu new file mode 100644 index 0000000..5df0fcb --- /dev/null +++ b/toolboxes/google-chrome-toolbox/Containerfile.ubuntu @@ -0,0 +1,24 @@ +FROM quay.io/toolbx-images/ubuntu-toolbox:22.04 +# From https://github.com/toolbx-images/images/tree/main/ubuntu/22.04 + +LABEL com.github.containers.toolbox="true" \ + usage="This image is meant to be used with the toolbox or distrobox command" \ + summary="A cloud-native terminal experience powered by Ubuntu" \ + maintainer="jorge.castro@gmail.com" + +COPY ./toolboxes/ubuntu-toolbox/packages.ubuntu /toolbox-packages + +RUN apt-get update && \ + apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get -y install \ + $(cat toolbox-packages | xargs) && \ + rm -rd /var/lib/apt/lists/* + +RUN rm /toolbox-packages + +RUN ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree + +RUN echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers \ No newline at end of file diff --git a/toolboxes/google-chrome-toolbox/packages.ubuntu b/toolboxes/google-chrome-toolbox/packages.ubuntu new file mode 100644 index 0000000..8a141ed --- /dev/null +++ b/toolboxes/google-chrome-toolbox/packages.ubuntu @@ -0,0 +1,89 @@ +bc +dbus-x11 +direnv +fzf +libegl1-mesa +libgl1-mesa-glx +libvte-common +make +neofetch +plocate +progress +apt-utils +dialog +dirmngr +gnupg +gnupg-l10n +gnupg-utils +gnupg2 +gpg +ca-certificates +libnsl2 +libpython3-stdlib +gpg-agent +gpg-wks-client +gpg-wks-server +gpgsm +libksba8 +libnpth0 +libpython3.11-minimal +gpgconf +libnss-myhostname +libsqlite3-0 +libtirpc-common +libtirpc3 +libvte-2.91-common +openssl +lsof +pinentry-curses +time +libpython3.11-stdlib +libvulkan1 +media-types +mesa-vulkan-drivers +libbsd0 +libdrm-amdgpu1 +libdrm-common +libdrm-nouveau2 +libdrm-radeon1 +libdrm2 +libedit2 +libegl-mesa0 +libegl1 +libegl1-mesa +libelf1 +libexpat1 +libgbm1 +libgl1 +libgl1-amber-dri +libgl1-mesa-dri +libgl1-mesa-glx +libglapi-mesa +libglvnd0 +libglx-mesa0 +libglx0 +libicu70 +libllvm15 +libpciaccess0 +libsensors-config +libsensors5 +libwayland-client0 +libwayland-server0 +libx11-6 +libx11-data +libx11-xcb1 +libxau6 +libxcb-dri2-0 +libxcb-dri3-0 +libxcb-glx0 +libxcb-present0 +libxcb-randr0 +libxcb-shm0 +libxcb-sync1 +libxcb-xfixes0 +libxcb1 +libxdmcp6 +libxext6 +libxfixes3 +libxml2 +pigz