Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
feat: add google chrome toolboxes and fix badges in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sneexy-boi committed Apr 3, 2024
1 parent 9157f39 commit 637427b
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 1 deletion.
108 changes: 108 additions & 0 deletions .github/workflows/build-google-chrome-toolbox.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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) }}"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div align="center">

[![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)

</div>

Expand Down
24 changes: 24 additions & 0 deletions toolboxes/google-chrome-toolbox/Containerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -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="[email protected]"

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
89 changes: 89 additions & 0 deletions toolboxes/google-chrome-toolbox/packages.ubuntu
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 637427b

Please sign in to comment.