Use a dedicated CI image with builtin:checkout
CI / test (push) Successful in 21s

This commit is contained in:
basti committed 2026-10-24 19:49:23 +02:00
1 parent 1fd6f93309
commit 0cf5926b65
2 files changed
+37 -6

No files matched your search

+4 -6
View File
@@ -10,7 +10,7 @@ jobs:
test:
runs-on: ubuntu-latest
container:
image: ruby:3.1.4-bullseye
image: gitea.kosmos.org/5apps/liquor-cabinet-ci@sha256:08cefffe243ce8eb839603cbb80576e83dad8b04e0b7724a0800063a735a6a86
services:
redis:
image: redis:4.0
@@ -23,12 +23,10 @@ jobs:
env:
REDIS_HOST: redis
steps:
- uses: actions/checkout@v4
- uses: builtin:checkout
- name: Test
run: |
set -e
apt-get update -qq
apt-get install -y -qq --no-install-recommends build-essential git
cp config.yml.erb.example config.yml.erb
bundle install --jobs=3 --retry=3
bundle exec rake test
bundle _2.3.7_ install --jobs=3 --retry=3
bundle _2.3.7_ exec rake test
+33
View File
@@ -0,0 +1,33 @@
# CI image for liquor-cabinet (Ruby 3.1.4).
FROM ruby:3.1.4-bullseye
ENV DEBIAN_FRONTEND=noninteractive
# bullseye is EOL: use the Debian archive mirror and skip valid-until checks.
RUN sed -i 's|deb.debian.org|archive.debian.org|g; s|security.debian.org|archive.debian.org|g' /etc/apt/sources.list \
&& echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99nc \
&& apt-get update \
&& apt-get install -y --no-install-recommends build-essential cmake pkg-config autoconf automake \
bzip2 curl xz-utils ca-certificates openssh-client gettext zlib1g-dev \
libssl-dev libcurl4-openssl-dev libpcre2-dev libexpat1-dev \
&& rm -rf /var/lib/apt/lists/*
# git >= 2.34.1 is required by the runner's `builtin:checkout`.
ARG GIT_VERSION=2.45.2
RUN curl -fsSL "https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.xz" -o /tmp/git.tar.xz \
&& tar -xJf /tmp/git.tar.xz -C /tmp \
&& make -C "/tmp/git-${GIT_VERSION}" -j"$(nproc)" NO_TCLTK=1 NO_GETTEXT=1 prefix=/usr/local all \
&& make -C "/tmp/git-${GIT_VERSION}" NO_TCLTK=1 NO_GETTEXT=1 prefix=/usr/local install \
&& rm -rf /tmp/git* \
&& git --version
# Node.js 20 for JS actions (e.g. actions/cache) if used later.
ARG NODE_VERSION=20.18.0
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 -v
RUN gem install bundler -v 2.3.7 --no-document
WORKDIR /workspace