mirror of
https://github.com/Belphemur/CBZOptimizer.git
synced 2025-10-13 20:18:52 +02:00
fix(docker): have already the converter in the docker image
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
- name: Setup test environment
|
||||
run: |
|
||||
go build -tags testsetup -o test-setup ./cmd/test-setup
|
||||
go build -tags encoder_setup -o test-setup ./cmd/test-setup
|
||||
./test-setup
|
||||
|
||||
- name: Run tests
|
||||
|
@@ -5,6 +5,17 @@ release:
|
||||
github:
|
||||
owner: belphemur
|
||||
name: CBZOptimizer
|
||||
ids:
|
||||
- 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 +55,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 +101,7 @@ dockers_v2:
|
||||
- id: cbzoptimizer-image
|
||||
ids:
|
||||
- cbzoptimizer
|
||||
- encoder-setup
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
@@ -90,7 +121,7 @@ dockers_v2:
|
||||
# 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
|
||||
signs:
|
||||
- cmd: cosign
|
||||
- cmd: cosign-windows-amd64.exe
|
||||
env:
|
||||
- COSIGN_EXPERIMENTAL=1
|
||||
certificate: "${artifact}.pem"
|
||||
@@ -105,7 +136,7 @@ signs:
|
||||
# signs our docker image
|
||||
# https://goreleaser.com/customization/docker_sign
|
||||
docker_signs:
|
||||
- cmd: cosign
|
||||
- cmd: cosign-windows-amd64.exe
|
||||
env:
|
||||
- COSIGN_EXPERIMENTAL=1
|
||||
output: true
|
||||
|
10
Dockerfile
10
Dockerfile
@@ -7,7 +7,9 @@ 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 \
|
||||
@@ -21,7 +23,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends adduser && \
|
||||
|
||||
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 install -y --no-install-recommends \
|
||||
inotify-tools \
|
||||
@@ -29,6 +34,7 @@ RUN apt-get update && \
|
||||
ca-certificates \
|
||||
bash-completion && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
/tmp/target/encoder-setup && \
|
||||
chmod +x ${APP_PATH} && \
|
||||
${APP_PATH} completion bash > /etc/bash_completion.d/CBZOptimizer.bash
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//go:build testsetup
|
||||
// +build testsetup
|
||||
//go:build encoder_setup
|
||||
// +build encoder_setup
|
||||
|
||||
package main
|
||||
|
Reference in New Issue
Block a user