From b878390b46293d3f54a424ab296f051cdd87420a Mon Sep 17 00:00:00 2001 From: Antoine Aflalo <197810+Belphemur@users.noreply.github.com> Date: Tue, 9 Sep 2025 21:03:49 -0400 Subject: [PATCH] ci: goreleaser fixes --- .goreleaser.yml | 20 +++++++++++++++++++- Dockerfile | 6 ++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 03daabe..88777bb 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -68,7 +68,13 @@ sboms: # create a docker image # https://goreleaser.com/customization/docker dockers_v2: - - images: + - id: cbzoptimizer-image + ids: + - cbzoptimizer + platforms: + - linux/amd64 + - linux/arm64 + images: - "ghcr.io/belphemur/cbzoptimizer" tags: - "{{ .Version }}" @@ -79,6 +85,7 @@ dockers_v2: "org.opencontainers.image.revision": "{{.FullCommit}}" "org.opencontainers.image.version": "{{.Version}}" "org.opencontainers.image.source": "{{.GitURL}}" + "org.opencontainers.image.description": "CBZOptimizer is a Go-based tool designed to optimize CBZ (Comic Book Zip) and CBR (Comic Book RAR) files by converting images to a specified format and quality. This tool is useful for reducing the size of comic book archives while maintaining acceptable image quality." # signs the checksum file # all files (including the sboms) are included in the checksum, so we don't need to sign each one if we don't want to # https://goreleaser.com/customization/sign @@ -95,3 +102,14 @@ signs: - "--yes" # needed on cosign 2.0.0+ artifacts: checksum output: true +# signs our docker image +# https://goreleaser.com/customization/docker_sign +docker_signs: + - cmd: cosign + env: + - COSIGN_EXPERIMENTAL=1 + output: true + args: + - "sign" + - "${artifact}" + - "--yes" # needed on cosign 2.0.0+ diff --git a/Dockerfile b/Dockerfile index 2d3a2eb..10aaa34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,16 @@ ENV USER=abc ENV CONFIG_FOLDER=/config ENV PUID=99 -RUN addgroup --system users && \ +RUN apt-get update && apt-get install -y --no-install-recommends adduser && \ + addgroup --system users && \ adduser \ --system \ --home "${CONFIG_FOLDER}" \ --uid "${PUID}" \ --ingroup users \ --disabled-password \ - "${USER}" + "${USER}" && \ + apt-get purge -y --auto-remove adduser COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH}