ci: use a prebuilt image with every pipeline dependency
CI / test (push) Successful in 1m52s
CI / chart (push) Successful in 3s
CI / image (push) Failing after 2s

Add ci/Dockerfile (JDK 21, Gradle 8.14.3, ffmpeg, sqlite3, node,
docker CLI and Helm) and build it as taptap/audiomanager-ci. Workflows
now start from that image instead of downloading a JDK and installing
packages on every run.

The registry namespace is the lowercased package owner `taptap`, not
`tap-tap`; update the chart, workflow and documentation accordingly.
The image build uses plain docker build/push, since the job container
starts with no buildx plugin.
This commit is contained in:
TapTap committed 2026-11-13 13:37:15 +00:00
1 parent d812e7644f
commit 4c6f1c8fe8
6 files changed
+103 -38

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
# Image for Gitea Actions jobs. It contains every tool the pipeline needs so
# workflows do not download a JDK or install packages on every run.
#
# Build and push it with scripts/build-ci-image.sh.
FROM gradle:8.14.3-jdk21
ARG NODE_VERSION=22.14.0
ARG DOCKER_VERSION=27.3.1
ARG HELM_VERSION=3.16.4
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
ffmpeg \
sqlite3 \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Node is required by actions/checkout and other JavaScript actions executed
# inside the job container.
RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
-o /tmp/node.tar.xz \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& rm /tmp/node.tar.xz \
&& node --version \
&& npm --version
# Docker CLI only (the runner mounts its daemon socket into the job).
RUN curl -fsSL "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz" \
-o /tmp/docker.tgz \
&& tar -xzf /tmp/docker.tgz -C /tmp \
&& install -m 0755 /tmp/docker/docker /usr/local/bin/docker \
&& rm -rf /tmp/docker /tmp/docker.tgz \
&& docker --version
RUN curl -fsSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" \
-o /tmp/helm.tgz \
&& tar -xzf /tmp/helm.tgz -C /tmp \
&& install -m 0755 /tmp/linux-amd64/helm /usr/local/bin/helm \
&& rm -rf /tmp/helm.tgz /tmp/linux-amd64 \
&& helm version --short
ENV GRADLE_USER_HOME=/root/.gradle \
JAVA_HOME=/opt/java/openjdk
WORKDIR /workspace
CMD ["sleep", "infinity"]