diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c5c46c5b..9edc7225 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,10 +7,11 @@ on: workflow_dispatch: push: branches: - - main + - 'main' + - 'test-*' pull_request: branches: - - main + - 'main' types: - opened - reopened @@ -135,14 +136,15 @@ jobs: push: false tags: ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive - name: Analysis with `dive` + continue-on-error: false run: | docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ 'ghcr.io/wagoodman/dive' \ 'ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive' \ --ci \ - --highestUserWastedPercent '0.03' \ - --highestWastedBytes '10M' + --highestUserWastedPercent '0.05' \ + --highestWastedBytes '50M' - name: Build and push id: build-push timeout-minutes: 60 diff --git a/Dockerfile b/Dockerfile index d3169884..d68efe3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ FROM debian:${DEBIAN_VERSION} AS tubesync-base ARG TARGETARCH ENV DEBIAN_FRONTEND="noninteractive" \ + APT_KEEP_ARCHIVES=1 \ HOME="/root" \ LANGUAGE="en_US.UTF-8" \ LANG="en_US.UTF-8" \ @@ -39,6 +40,11 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va rm -f /var/cache/apt/*cache.bin ; \ # Update from the network and keep cache rm -f /etc/apt/apt.conf.d/docker-clean ; \ + # Do not generate more /var/cache/apt/*cache.bin files + # hopefully soon, this will be included in Debian images + printf -- >| /etc/apt/apt.conf.d/docker-disable-pkgcache \ + 'Dir::Cache::%spkgcache "";\n' '' src ; \ + chmod a+r /etc/apt/apt.conf.d/docker-disable-pkgcache ; \ set -x && \ apt-get update && \ # Install locales @@ -215,21 +221,22 @@ RUN set -eu ; \ case "${arg1}" in \ (amd64) printf -- 'x86_64' ;; \ (arm64) printf -- 'aarch64' ;; \ - (armv7l) printf -- 'arm' ;; \ + (arm|armv7l) printf -- 'armhf' ;; \ (*) printf -- '%s' "${arg1}" ;; \ esac ; \ unset -v arg1 ; \ } ; \ \ + file_ext="${CHECKSUM_ALGORITHM}" ; \ apk --no-cache --no-progress add "cmd:${CHECKSUM_ALGORITHM}sum" ; \ mkdir -v /verified ; \ cd /downloaded ; \ - for f in *.sha256 ; \ + for f in *."${file_ext}" ; \ do \ "${CHECKSUM_ALGORITHM}sum" --check --warn --strict "${f}" || exit ; \ - ln -v "${f%.sha256}" /verified/ || exit ; \ + ln -v "${f%.${file_ext}}" /verified/ || exit ; \ done ; \ - unset -v f ; \ + unset -v f file_ext ; \ \ S6_ARCH="$(decide_arch "${TARGETARCH}")" ; \ set -x ; \