add actions
This commit is contained in:
@ -6,7 +6,10 @@ FROM gitea/act_runner:latest
|
|||||||
LABEL maintainer="www.imyeyu.com"
|
LABEL maintainer="www.imyeyu.com"
|
||||||
LABEL description="Gitea Action Runner with basic build tools"
|
LABEL description="Gitea Action Runner with basic build tools"
|
||||||
|
|
||||||
# 安装基本构建工具
|
# 预装常用 GitHub Actions 缓存目录
|
||||||
|
ENV ACTIONS_CACHE_DIR=/root/.cache/act
|
||||||
|
|
||||||
|
# 安装基本构建工具并预装常用 GitHub Actions
|
||||||
# act_runner 基于 Alpine Linux
|
# act_runner 基于 Alpine Linux
|
||||||
RUN apk update && apk add --no-cache \
|
RUN apk update && apk add --no-cache \
|
||||||
# 版本控制
|
# 版本控制
|
||||||
@ -43,4 +46,13 @@ RUN apk update && apk add --no-cache \
|
|||||||
# 其他常用工具
|
# 其他常用工具
|
||||||
jq \
|
jq \
|
||||||
tree \
|
tree \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
# 预装常用 GitHub Actions,避免每次执行都从 GitHub clone
|
||||||
|
&& mkdir -p ${ACTIONS_CACHE_DIR} \
|
||||||
|
&& cd ${ACTIONS_CACHE_DIR} \
|
||||||
|
&& git clone --depth 1 --branch v4 https://github.com/actions/checkout.git actions-checkout@v4 \
|
||||||
|
&& git clone --depth 1 --branch v4 https://github.com/actions/cache.git actions-cache@v4 \
|
||||||
|
&& git clone --depth 1 --branch v4 https://github.com/actions/upload-artifact.git actions-upload-artifact@v4 \
|
||||||
|
&& git clone --depth 1 --branch v4 https://github.com/actions/download-artifact.git actions-download-artifact@v4 \
|
||||||
|
# 清理 .git 目录减少镜像体积
|
||||||
|
&& find ${ACTIONS_CACHE_DIR} -name ".git" -type d -exec rm -rf {} + 2>/dev/null || true
|
||||||
|
|||||||
Reference in New Issue
Block a user