mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 06:26:37 +00:00
Merge pull request #971 from tcely/patch-2
Some checks failed
CI / info (push) Has been cancelled
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.8) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / containerise (push) Has been cancelled
Some checks failed
CI / info (push) Has been cancelled
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / test (3.8) (push) Has been cancelled
CI / test (3.9) (push) Has been cancelled
CI / containerise (push) Has been cancelled
Add /etc/apt/apt.conf.d/docker-disable-pkgcache
This commit is contained in:
commit
98c031ed5f
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
@ -7,10 +7,11 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- 'main'
|
||||||
|
- 'test-*'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- 'main'
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- reopened
|
- reopened
|
||||||
@ -135,14 +136,15 @@ jobs:
|
|||||||
push: false
|
push: false
|
||||||
tags: ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive
|
tags: ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive
|
||||||
- name: Analysis with `dive`
|
- name: Analysis with `dive`
|
||||||
|
continue-on-error: false
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
'ghcr.io/wagoodman/dive' \
|
'ghcr.io/wagoodman/dive' \
|
||||||
'ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive' \
|
'ghcr.io/${{ needs.info.outputs.lowercase-github-actor }}/${{ env.IMAGE_NAME }}:dive' \
|
||||||
--ci \
|
--ci \
|
||||||
--highestUserWastedPercent '0.03' \
|
--highestUserWastedPercent '0.05' \
|
||||||
--highestWastedBytes '10M'
|
--highestWastedBytes '50M'
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: build-push
|
id: build-push
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
15
Dockerfile
15
Dockerfile
@ -24,6 +24,7 @@ FROM debian:${DEBIAN_VERSION} AS tubesync-base
|
|||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||||
|
APT_KEEP_ARCHIVES=1 \
|
||||||
HOME="/root" \
|
HOME="/root" \
|
||||||
LANGUAGE="en_US.UTF-8" \
|
LANGUAGE="en_US.UTF-8" \
|
||||||
LANG="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 ; \
|
rm -f /var/cache/apt/*cache.bin ; \
|
||||||
# Update from the network and keep cache
|
# Update from the network and keep cache
|
||||||
rm -f /etc/apt/apt.conf.d/docker-clean ; \
|
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 && \
|
set -x && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
# Install locales
|
# Install locales
|
||||||
@ -215,21 +221,22 @@ RUN set -eu ; \
|
|||||||
case "${arg1}" in \
|
case "${arg1}" in \
|
||||||
(amd64) printf -- 'x86_64' ;; \
|
(amd64) printf -- 'x86_64' ;; \
|
||||||
(arm64) printf -- 'aarch64' ;; \
|
(arm64) printf -- 'aarch64' ;; \
|
||||||
(armv7l) printf -- 'arm' ;; \
|
(arm|armv7l) printf -- 'armhf' ;; \
|
||||||
(*) printf -- '%s' "${arg1}" ;; \
|
(*) printf -- '%s' "${arg1}" ;; \
|
||||||
esac ; \
|
esac ; \
|
||||||
unset -v arg1 ; \
|
unset -v arg1 ; \
|
||||||
} ; \
|
} ; \
|
||||||
\
|
\
|
||||||
|
file_ext="${CHECKSUM_ALGORITHM}" ; \
|
||||||
apk --no-cache --no-progress add "cmd:${CHECKSUM_ALGORITHM}sum" ; \
|
apk --no-cache --no-progress add "cmd:${CHECKSUM_ALGORITHM}sum" ; \
|
||||||
mkdir -v /verified ; \
|
mkdir -v /verified ; \
|
||||||
cd /downloaded ; \
|
cd /downloaded ; \
|
||||||
for f in *.sha256 ; \
|
for f in *."${file_ext}" ; \
|
||||||
do \
|
do \
|
||||||
"${CHECKSUM_ALGORITHM}sum" --check --warn --strict "${f}" || exit ; \
|
"${CHECKSUM_ALGORITHM}sum" --check --warn --strict "${f}" || exit ; \
|
||||||
ln -v "${f%.sha256}" /verified/ || exit ; \
|
ln -v "${f%.${file_ext}}" /verified/ || exit ; \
|
||||||
done ; \
|
done ; \
|
||||||
unset -v f ; \
|
unset -v f file_ext ; \
|
||||||
\
|
\
|
||||||
S6_ARCH="$(decide_arch "${TARGETARCH}")" ; \
|
S6_ARCH="$(decide_arch "${TARGETARCH}")" ; \
|
||||||
set -x ; \
|
set -x ; \
|
||||||
|
Loading…
Reference in New Issue
Block a user