10 Commits

Author SHA1 Message Date
Antoine Aflalo
6b92336ba1 fix(docker): be sure we have the encoder installed in the right user folder 2025-09-10 09:00:35 -04:00
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
Antoine Aflalo
12817b1bff ci: full upgrade 2025-09-09 21:48:26 -04:00
Antoine Aflalo
19dcf9d40b fix(docker): missing ca-certificate 2025-09-09 21:47:47 -04:00
Antoine Aflalo
a7fa5bd0c7 ci: no need for interactive for docker image 2025-09-09 21:44:30 -04:00
4 changed files with 49 additions and 8 deletions

View File

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

View File

@@ -5,6 +5,15 @@ release:
github:
owner: belphemur
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:
sort: asc
filters:
@@ -44,6 +53,25 @@ builds:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
env:
- 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
# https://goreleaser.com/customization/checksum
checksum:
@@ -71,6 +99,7 @@ dockers_v2:
- id: cbzoptimizer-image
ids:
- cbzoptimizer
- encoder-setup
platforms:
- linux/amd64
- linux/arm64

View File

@@ -5,8 +5,11 @@ ARG APP_PATH=/usr/local/bin/CBZOptimizer
ENV USER=abc
ENV CONFIG_FOLDER=/config
ENV PUID=99
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 && \
adduser \
--system \
@@ -19,14 +22,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends adduser && \
COPY ${TARGETPLATFORM}/CBZOptimizer ${APP_PATH}
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get full-upgrade -y && \
apt-get install -y --no-install-recommends \
inotify-tools \
bash \
ca-certificates \
bash-completion && \
rm -rf /var/lib/apt/lists/* && \
chmod +x ${APP_PATH} && \
${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash
VOLUME ${CONFIG_FOLDER}
USER ${USER}
# Need to run as the user to have the right config folder created
RUN --mount=type=bind,source=${TARGETPLATFORM},target=/tmp/target \
/tmp/target/encoder-setup
ENTRYPOINT ["/usr/local/bin/CBZOptimizer"]

View File

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