6 Commits

Author SHA1 Message Date
Antoine Aflalo
a6ad1dada3 fix(release): fix not having archive in the release 2025-09-10 08:49:50 -04:00
Antoine Aflalo
17fe01f27c fix(docker): remove unnecessary volume declaration and clean up bashrc setup 2025-09-09 22:58:24 -04:00
Antoine Aflalo
4fa3014d80 fix(docker): when we set the volume
To be sure we have the cache downloaded
2025-09-09 22:55:27 -04:00
Antoine Aflalo
a47af5a7a8 ci: fix cosign 2025-09-09 22:32:09 -04:00
Antoine Aflalo
d7f13132f4 ci: fix test workflow 2025-09-09 22:23:22 -04:00
Antoine Aflalo
a8587f3f1f fix(docker): have already the converter in the docker image 2025-09-09 22:21:50 -04:00
4 changed files with 43 additions and 10 deletions

View File

@@ -21,8 +21,8 @@ jobs:
- name: Setup test environment - name: Setup test environment
run: | run: |
go build -tags testsetup -o test-setup ./cmd/test-setup go build -tags encoder_setup -o encoder-setup ./cmd/encoder-setup
./test-setup ./encoder-setup
- name: Run tests - name: Run tests
run: | run: |

View File

@@ -5,6 +5,15 @@ release:
github: github:
owner: belphemur owner: belphemur
name: CBZOptimizer name: CBZOptimizer
archives:
- ids:
- cbzoptimizer
formats: ["tar.zst"]
format_overrides:
- # Which GOOS to override the format for.
goos: windows
formats: ["zip"] # Plural form, multiple formats. Since: v2.6
changelog: changelog:
sort: asc sort: asc
filters: filters:
@@ -44,6 +53,25 @@ builds:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
- id: encoder-setup
main: cmd/encoder-setup/main.go
binary: encoder-setup
goos:
- linux
goarch:
- amd64
- arm64
# ensures mod timestamp to be the commit timestamp
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
# trims path
- -trimpath
tags:
- encoder_setup
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
env:
- CGO_ENABLED=0
# config the checksum filename # config the checksum filename
# https://goreleaser.com/customization/checksum # https://goreleaser.com/customization/checksum
checksum: checksum:
@@ -71,6 +99,7 @@ dockers_v2:
- id: cbzoptimizer-image - id: cbzoptimizer-image
ids: ids:
- cbzoptimizer - cbzoptimizer
- encoder-setup
platforms: platforms:
- linux/amd64 - linux/amd64
- linux/arm64 - linux/arm64

View File

@@ -7,7 +7,9 @@ ENV CONFIG_FOLDER=/config
ENV PUID=99 ENV PUID=99
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends adduser && \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends adduser && \
addgroup --system users && \ addgroup --system users && \
adduser \ adduser \
--system \ --system \
@@ -16,22 +18,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends adduser && \
--ingroup users \ --ingroup users \
--disabled-password \ --disabled-password \
"${USER}" && \ "${USER}" && \
apt-get purge -y --auto-remove adduser && \ apt-get purge -y --auto-remove adduser
rm -rf /var/lib/apt/lists/*
COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH} COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH}
RUN apt-get update && \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=bind,source=${TARGETPLATFORM},target=/tmp/target \
apt-get update && \
apt-get full-upgrade -y && \ apt-get full-upgrade -y && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
inotify-tools \ inotify-tools \
bash \ bash \
ca-certificates \ ca-certificates \
bash-completion && \ bash-completion && \
rm -rf /var/lib/apt/lists/* && \ /tmp/target/encoder-setup && \
chmod +x ${APP_PATH} && \ chmod +x ${APP_PATH} && \
${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash ${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash
VOLUME ${CONFIG_FOLDER}
USER ${USER} USER ${USER}
ENTRYPOINT ["/usr/local/bin/CBZOptimizer"] ENTRYPOINT ["/usr/local/bin/CBZOptimizer"]

View File

@@ -1,5 +1,5 @@
//go:build testsetup //go:build encoder_setup
// +build testsetup // +build encoder_setup
package main package main