add act-runners/kubectl-mini image and gitea workflow
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
ARG ACT_RUNNER_VERSION=3.0.2
|
||||
|
||||
|
||||
# STAGE 1 — BUILDER
|
||||
FROM alpine:3.20 AS builder
|
||||
ARG ACT_RUNNER_VERSION
|
||||
RUN apk add --no-cache curl unzip
|
||||
|
||||
# Kubectl
|
||||
RUN curl -Lo /tmp/kubectl \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" \
|
||||
&& chmod +x /tmp/kubectl
|
||||
|
||||
ARG ACT_RUNNER_VERSION
|
||||
# ACT Runner
|
||||
RUN curl -sSLO "https://dl.gitea.com/gitea-runner/${ACT_RUNNER_VERSION}/gitea-runner-${ACT_RUNNER_VERSION}-linux-amd64" \
|
||||
&& curl -sSLO "https://dl.gitea.com/gitea-runner/${ACT_RUNNER_VERSION}/gitea-runner-${ACT_RUNNER_VERSION}-linux-amd64.sha256" \
|
||||
&& sed -i '/found/d' "gitea-runner-${ACT_RUNNER_VERSION}-linux-amd64.sha256" \
|
||||
&& sha256sum -c "gitea-runner-${ACT_RUNNER_VERSION}-linux-amd64.sha256" \
|
||||
&& install -m 0755 "gitea-runner-${ACT_RUNNER_VERSION}-linux-amd64" /tmp/gitea-runner
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# STAGE 2 — FINAL IMAGE
|
||||
# --------------------------------------------------------------------
|
||||
FROM alpine:3.20
|
||||
|
||||
|
||||
COPY --from=builder /tmp/kubectl /usr/local/bin/kubectl
|
||||
COPY --from=builder /tmp/gitea-runner /usr/local/bin/act_runner
|
||||
|
||||
|
||||
RUN addgroup -g 1000 kube \
|
||||
&& adduser -D -u 1000 -G kube -s /bin/ash kube \
|
||||
&& mkdir -p /home/kube \
|
||||
&& chown -R kube:kube /home/kube
|
||||
|
||||
USER kube
|
||||
WORKDIR /home/kube
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/act_runner"]
|
||||
Reference in New Issue
Block a user