|
|
|
@@ -36,21 +36,28 @@ jobs:
|
|
|
|
|
id: meta
|
|
|
|
|
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
|
|
|
|
|
|
|
|
|
# The job container (node:20-bookworm) ships no docker CLI, and builds
|
|
|
|
|
# run against the runner host's daemon (docker-outside-of-docker), so
|
|
|
|
|
# the socket must be mounted by the runner config.
|
|
|
|
|
- name: Set up Docker CLI (not shipped in job container)
|
|
|
|
|
# Builds run docker-outside-of-docker through the runner-mounted
|
|
|
|
|
# /var/run/docker.sock. The apollo runner's job image (act-job:20,
|
|
|
|
|
# .gitea/job-image) already ships the docker CLI + buildx in system
|
|
|
|
|
# plugin paths; runners on other networks fall back to installing them
|
|
|
|
|
# at runtime (needs access to download.docker.com + github.com, and the
|
|
|
|
|
# plugin must land where docker looks with DOCKER_CONFIG set).
|
|
|
|
|
- name: Set up Docker CLI (preinstalled on apollo; install elsewhere)
|
|
|
|
|
run: |
|
|
|
|
|
set -eu
|
|
|
|
|
if [ ! -S /var/run/docker.sock ]; then
|
|
|
|
|
echo "::error::/var/run/docker.sock is not mounted in the job container - add 'options: -v /var/run/docker.sock:/var/run/docker.sock' and 'valid_volumes: [/var/run/docker.sock]' under 'container:' in the act_runner config.yaml, then restart the runner."
|
|
|
|
|
echo "::error::/var/run/docker.sock is not mounted in the job container - the act_runner config must mount it (docker_host: \"\" auto-mounts it)."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
curl -fsSL "https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz" | tar xz --strip-components=1 -C /usr/local/bin docker/docker
|
|
|
|
|
mkdir -p /root/.docker/cli-plugins
|
|
|
|
|
curl -fsSL "https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64" -o /root/.docker/cli-plugins/docker-buildx
|
|
|
|
|
chmod +x /root/.docker/cli-plugins/docker-buildx
|
|
|
|
|
if ! command -v docker >/dev/null 2>&1 || ! docker buildx version >/dev/null 2>&1; then
|
|
|
|
|
curl -fsSL "https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz" | tar xz --strip-components=1 -C /usr/local/bin docker/docker
|
|
|
|
|
mkdir -p /root/.docker/cli-plugins /usr/local/libexec/docker/cli-plugins
|
|
|
|
|
curl -fsSL "https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64" -o /root/.docker/cli-plugins/docker-buildx
|
|
|
|
|
cp /root/.docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
|
|
|
|
|
chmod +x /root/.docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
|
|
|
|
|
fi
|
|
|
|
|
docker version
|
|
|
|
|
docker buildx version
|
|
|
|
|
|
|
|
|
|
- name: Login to Gitea container registry
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|