mirror of
https://codeberg.org/Toasterson/solstice-ci.git
synced 2026-04-10 21:30:41 +00:00
New crate that registers as a Forgejo Actions Runner, polls for tasks via connect-rpc, translates them into Solstice JobRequests (with 3-tier fallback: KDL workflow → Actions YAML run steps → unsupported error), and reports results back to Forgejo. Includes Containerfile and compose.yml service definition.
25 lines
1.2 KiB
Docker
25 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
# Build Solstice Runner Integration using upstream official images
|
|
|
|
FROM docker.io/library/rust:bookworm AS builder
|
|
ENV CARGO_HOME=/cargo
|
|
WORKDIR /work
|
|
# Install protoc for tonic/prost builds
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends protobuf-compiler libprotobuf-dev ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
# Configure cargo target-dir so it can be cached between layers
|
|
RUN mkdir -p /cargo && printf "[build]\ntarget-dir = \"/cargo/target\"\n" > /cargo/config.toml
|
|
COPY Cargo.toml ./
|
|
COPY crates ./crates
|
|
RUN --mount=type=cache,target=/cargo/registry,sharing=locked \
|
|
--mount=type=cache,target=/cargo/git,sharing=locked \
|
|
--mount=type=cache,target=/cargo/target,sharing=locked \
|
|
cargo build --release -p runner-integration && cp /cargo/target/release/solstice-runner-integration /solstice-runner-integration
|
|
|
|
FROM docker.io/library/debian:bookworm-slim
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY --from=builder /solstice-runner-integration /usr/local/bin/solstice-runner-integration
|
|
ENTRYPOINT ["/usr/local/bin/solstice-runner-integration"]
|