From 2fd9d94d4e08488625175388aa8cf17a7754fdfb Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 26 Nov 2025 18:20:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD):=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 38 +++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ DockerfileCN | 16 ++++++++++++++++ DockerfileHK | 13 +++++++++++++ LICENSE | 21 ++++++++++++++++++++ README.md | 9 +++++++++ 6 files changed, 100 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 .gitignore create mode 100644 DockerfileCN create mode 100644 DockerfileHK create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..78a8b89 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,38 @@ +on: [push, workflow_dispatch] +jobs: + build: + runs-on: cn + container: ccr.ccs.tencentyun.com/xiaoqidun/actbi:latest + strategy: + matrix: + include: + - dockerfile: DockerfileCN + registry: ccr.ccs.tencentyun.com + image: ccr.ccs.tencentyun.com/xiaoqidun/actbi:latest + - dockerfile: DockerfileHK + registry: hkccr.ccs.tencentyun.com + image: hkccr.ccs.tencentyun.com/xiaoqidun/actbi:latest + steps: + - name: checkout + uses: actions/checkout@v6 + - name: docker setup + uses: docker/setup-buildx-action@v3 + with: + driver-opts: | + "env.http_proxy=${{ env.HTTP_PROXY }}" + "env.https_proxy=${{ env.HTTPS_PROXY }}" + "env.no_proxy=${{ env.NO_PROXY }}" + - name: docker login + uses: docker/login-action@v3 + with: + registry: ${{ matrix.registry }} + username: ${{ secrets.docker_username }} + password: ${{ secrets.docker_password }} + - name: docker build + uses: docker/build-push-action@v6 + with: + context: . + push: true + provenance: false + file: ${{ matrix.dockerfile }} + tags: ${{ matrix.image }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..647d5b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea/ +.vscode/ +.devcontainer/ \ No newline at end of file diff --git a/DockerfileCN b/DockerfileCN new file mode 100644 index 0000000..6732fc5 --- /dev/null +++ b/DockerfileCN @@ -0,0 +1,16 @@ +# 基础镜像 +FROM node:20-bookworm-slim + +# 作者信息 +LABEL authors="xiaoqidun" + +# 国内镜像 +RUN sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources + +# 安装证书 +RUN apt-get update \ + && apt-get install -y ca-certificates curl \ + && rm -rf /var/lib/apt/lists/* + +# 安装docker +COPY --from=docker:cli /usr/local/bin/docker /usr/local/bin/ diff --git a/DockerfileHK b/DockerfileHK new file mode 100644 index 0000000..8181f4b --- /dev/null +++ b/DockerfileHK @@ -0,0 +1,13 @@ +# 基础镜像 +FROM node:20-bookworm-slim + +# 作者信息 +LABEL authors="xiaoqidun" + +# 安装证书 +RUN apt-get update \ + && apt-get install -y ca-certificates curl \ + && rm -rf /var/lib/apt/lists/* + +# 安装docker +COPY --from=docker:cli /usr/local/bin/docker /usr/local/bin/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..015c329 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 xiaoqidun + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..42db0a0 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# ActBI(Act Base Image) + +基于node:20-bookworm-slim集成Docker CLI的Gitea Actions基础镜像 + +# 镜像地址 + +国内(CN):ccr.ccs.tencentyun.com/xiaoqidun/actbi:latest + +海外(HK):hkccr.ccs.tencentyun.com/xiaoqidun/actbi:latest \ No newline at end of file