├── .github └── workflows │ ├── clash.meta.publish.yaml │ ├── clash.meta.version.yaml │ ├── mosdns.publish.yaml │ ├── mosdns.version.yaml │ ├── override.publish.yaml │ └── override.version.yaml ├── README ├── clash.meta ├── Dockerfile ├── README └── version.txt ├── mosdns ├── Dockerfile ├── README └── version.txt └── override ├── Dockerfile ├── README └── version.txt /.github/workflows/clash.meta.publish.yaml: -------------------------------------------------------------------------------- 1 | name: CLASH.META - Publish Docker Image 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | paths: 7 | - "clash.meta/version.txt" 8 | workflow_dispatch: 9 | 10 | env: 11 | PROJECT_NAME: clash.meta 12 | 13 | jobs: 14 | main: 15 | runs-on: ubuntu-22.04 16 | steps: 17 | - name: Check out the repo 18 | uses: actions/checkout@v3 19 | 20 | - name: Get version 21 | id: version 22 | uses: juliangruber/read-file-action@v1 23 | with: 24 | path: "${{ env.PROJECT_NAME }}/version.txt" 25 | 26 | - name: Set up QEMU 27 | uses: docker/setup-qemu-action@v2 28 | 29 | - name: Set up Docker Buildx 30 | uses: docker/setup-buildx-action@v2 31 | 32 | - name: Login to DockerHub 33 | uses: docker/login-action@v2 34 | with: 35 | username: ${{ secrets.DOCKERHUB_USERNAME }} 36 | password: ${{ secrets.DOCKERHUB_TOKEN }} 37 | 38 | - name: Build and push 39 | uses: docker/build-push-action@v4 40 | with: 41 | file: ${{ env.PROJECT_NAME }}/Dockerfile 42 | platforms: | 43 | linux/amd64 44 | linux/arm64 45 | linux/arm/v6 46 | linux/arm/v7 47 | push: true 48 | build-args: | 49 | VERSION=${{ steps.version.outputs.content }} 50 | tags: | 51 | yikyo/clash.meta:latest 52 | yikyo/clash.meta:${{ steps.version.outputs.content }} 53 | -------------------------------------------------------------------------------- /.github/workflows/clash.meta.version.yaml: -------------------------------------------------------------------------------- 1 | name: CLASH.META - Get latest release version 2 | 3 | on: 4 | schedule: 5 | - cron: "0 20 */7 * *" 6 | workflow_dispatch: 7 | 8 | env: 9 | PROJECT_NAME: clash.meta 10 | REPO: MetaCubeX/Clash.Meta 11 | GIT_AUTHOR_NAME: yiKyo 12 | GIT_AUTHOR_EMAIL: yikyo666@gmail.com 13 | 14 | jobs: 15 | get-version: 16 | runs-on: ubuntu-22.04 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | with: 21 | token: ${{ secrets.REPO_SCOPED_TOKEN }} 22 | 23 | - name: Fetch release version 24 | run: | 25 | curl -sL https://api.github.com/repos/$REPO/releases/latest | \ 26 | jq -r '.tag_name' > version.txt 27 | working-directory: "${{ env.PROJECT_NAME }}" 28 | 29 | - name: Get the number of modified files 30 | id: get_modified_files 31 | run: echo "number=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT 32 | 33 | - name: Commit latest release version 34 | if: steps.get_modified_files.outputs.number != 0 35 | run: | 36 | git config --global user.name $GIT_AUTHOR_NAME 37 | git config --global user.email $GIT_AUTHOR_EMAIL 38 | git commit -am 'New ${{ env.PROJECT_NAME }} release version' 39 | git push 40 | -------------------------------------------------------------------------------- /.github/workflows/mosdns.publish.yaml: -------------------------------------------------------------------------------- 1 | name: MOSDNS - Publish Docker Image 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | paths: 7 | - "mosdns/version.txt" 8 | workflow_dispatch: 9 | 10 | env: 11 | PROJECT_NAME: mosdns 12 | 13 | jobs: 14 | main: 15 | runs-on: ubuntu-22.04 16 | steps: 17 | - name: Check out the repo 18 | uses: actions/checkout@v3 19 | 20 | - name: Get version 21 | id: version 22 | uses: juliangruber/read-file-action@v1 23 | with: 24 | path: "${{ env.PROJECT_NAME }}/version.txt" 25 | 26 | - name: Set up QEMU 27 | uses: docker/setup-qemu-action@v2 28 | 29 | - name: Set up Docker Buildx 30 | uses: docker/setup-buildx-action@v2 31 | 32 | - name: Login to DockerHub 33 | uses: docker/login-action@v2 34 | with: 35 | username: ${{ secrets.DOCKERHUB_USERNAME }} 36 | password: ${{ secrets.DOCKERHUB_TOKEN }} 37 | 38 | - name: Build and push 39 | uses: docker/build-push-action@v4 40 | with: 41 | file: ${{ env.PROJECT_NAME }}/Dockerfile 42 | platforms: | 43 | linux/amd64 44 | linux/arm64 45 | linux/arm/v6 46 | linux/arm/v7 47 | push: true 48 | build-args: | 49 | VERSION=${{ steps.version.outputs.content }} 50 | tags: | 51 | yikyo/mosdns:latest 52 | yikyo/mosdns:${{ steps.version.outputs.content }} 53 | -------------------------------------------------------------------------------- /.github/workflows/mosdns.version.yaml: -------------------------------------------------------------------------------- 1 | name: MOSDNS - Get latest release version 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 */7 * *" 6 | workflow_dispatch: 7 | 8 | env: 9 | PROJECT_NAME: mosdns 10 | REPO: IrineSistiana/mosdns 11 | GIT_AUTHOR_NAME: yiKyo 12 | GIT_AUTHOR_EMAIL: yikyo666@gmail.com 13 | 14 | jobs: 15 | get-version: 16 | runs-on: ubuntu-22.04 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | with: 21 | token: ${{ secrets.REPO_SCOPED_TOKEN }} 22 | 23 | - name: Fetch release version 24 | run: | 25 | curl -sL https://api.github.com/repos/$REPO/releases/latest | \ 26 | jq -r '.tag_name' > version.txt 27 | working-directory: "${{ env.PROJECT_NAME }}" 28 | 29 | - name: Get the number of modified files 30 | id: get_modified_files 31 | run: echo "number=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT 32 | 33 | - name: Commit latest release version 34 | if: steps.get_modified_files.outputs.number != 0 35 | run: | 36 | git config --global user.name $GIT_AUTHOR_NAME 37 | git config --global user.email $GIT_AUTHOR_EMAIL 38 | git commit -am 'New ${{ env.PROJECT_NAME }} release version' 39 | git push 40 | -------------------------------------------------------------------------------- /.github/workflows/override.publish.yaml: -------------------------------------------------------------------------------- 1 | name: OVERRIDE - Publish Docker Image 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | paths: 7 | - "override/version.txt" 8 | workflow_dispatch: 9 | 10 | env: 11 | PROJECT_NAME: override 12 | 13 | jobs: 14 | main: 15 | runs-on: ubuntu-22.04 16 | steps: 17 | - name: Check out the repo 18 | uses: actions/checkout@v3 19 | 20 | - name: Get version 21 | id: version 22 | uses: juliangruber/read-file-action@v1 23 | with: 24 | path: "${{ env.PROJECT_NAME }}/version.txt" 25 | 26 | - name: Set up QEMU 27 | uses: docker/setup-qemu-action@v2 28 | 29 | - name: Set up Docker Buildx 30 | uses: docker/setup-buildx-action@v2 31 | 32 | - name: Login to DockerHub 33 | uses: docker/login-action@v2 34 | with: 35 | username: ${{ secrets.DOCKERHUB_USERNAME }} 36 | password: ${{ secrets.DOCKERHUB_TOKEN }} 37 | 38 | - name: Build and push 39 | uses: docker/build-push-action@v4 40 | with: 41 | file: ${{ env.PROJECT_NAME }}/Dockerfile 42 | platforms: | 43 | linux/amd64 44 | linux/arm64 45 | push: true 46 | build-args: | 47 | VERSION=${{ steps.version.outputs.content }} 48 | tags: | 49 | yikyo/override:latest 50 | yikyo/override:${{ steps.version.outputs.content }} 51 | -------------------------------------------------------------------------------- /.github/workflows/override.version.yaml: -------------------------------------------------------------------------------- 1 | name: OVERRIDE - Get latest release version 2 | 3 | on: 4 | schedule: 5 | - cron: "0 20 */7 * *" 6 | workflow_dispatch: 7 | 8 | env: 9 | PROJECT_NAME: override 10 | REPO: linux-do/override 11 | GIT_AUTHOR_NAME: yiKyo 12 | GIT_AUTHOR_EMAIL: yikyo666@gmail.com 13 | 14 | jobs: 15 | get-version: 16 | runs-on: ubuntu-22.04 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | with: 21 | token: ${{ secrets.REPO_SCOPED_TOKEN }} 22 | 23 | - name: Fetch release version 24 | run: | 25 | curl -sL https://api.github.com/repos/$REPO/releases/latest | \ 26 | jq -r '.tag_name' > version.txt 27 | working-directory: "${{ env.PROJECT_NAME }}" 28 | 29 | - name: Get the number of modified files 30 | id: get_modified_files 31 | run: echo "number=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT 32 | 33 | - name: Commit latest release version 34 | if: steps.get_modified_files.outputs.number != 0 35 | run: | 36 | git config --global user.name $GIT_AUTHOR_NAME 37 | git config --global user.email $GIT_AUTHOR_EMAIL 38 | git commit -am 'New ${{ env.PROJECT_NAME }} release version' 39 | git push 40 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | ## 项目介绍 2 | 3 | 定时运行 Github Action,根据上游版本信息,自动化更新 Docker 镜像。 4 | 5 | .github/.workflows/ 目录下的 xxx.version.yml 文件,会定时访问上游版本信息,一旦发现有新版本,会更新根目录下xxx/version.txt 6 | 7 | version.txt 文件更新后,会触发 Github Action 自动化构建 Docker 镜像。 8 | 9 | ## 子项目 10 | 11 | [clash.meta]: https://github.com/yikyo/docker/tree/master/clash.meta 12 | [mosdns]: https://github.com/yikyo/docker/tree/master/mosdns 13 | 14 | mosdns 项目添加了 https://github.com/sbwml/luci-app-mosdns 中的几个patch, 具体请查看 https://github.com/sbwml/luci-app-mosdns/tree/v5/mosdns/patches 15 | -------------------------------------------------------------------------------- /clash.meta/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.21.1-alpine3.18 as builder 2 | 3 | ARG CGO_ENABLED=0 VERSION 4 | 5 | RUN apk add --no-cache git && \ 6 | git clone --single-branch --depth 1 -b $VERSION https://github.com/MetaCubeX/Clash.Meta.git /source && \ 7 | cd /source && \ 8 | go build -tags with_gvisor -trimpath -ldflags "-s -w" -o clash 9 | 10 | 11 | FROM alpine:3.18.3 12 | 13 | LABEL maintainer="yiKyo " 14 | 15 | ENV TZ="Asia/Shanghai" 16 | 17 | VOLUME ["/etc/.clash.meta.d"] 18 | 19 | EXPOSE 7890 9090 20 | 21 | COPY --from=builder /source/clash /usr/local/bin/clash 22 | 23 | RUN apk add --no-cache ca-certificates tzdata iptables && \ 24 | chmod +x /usr/local/bin/clash 25 | 26 | ENTRYPOINT ["/usr/local/bin/clash", "-d", "/etc/.clash.meta.d"] -------------------------------------------------------------------------------- /clash.meta/README: -------------------------------------------------------------------------------- 1 | ## 项目介绍 2 | 3 | [github repo]: https://github.com/yikyo/docker/tree/master/clash.meta 4 | 5 | ## 如何使用 6 | 7 | 默认配置目录为 `/etc/.clash.meta.d` 8 | 9 | docker run --name clash -d \ 10 | -p 7890:7890 \ 11 | -p 7891:7891 \ 12 | -p 7892:7892 \ 13 | -p 9090:9090 \ 14 | -v /path/to/config:/etc/.clash.meta.d \ 15 | yikyo/clash.meta 16 | -------------------------------------------------------------------------------- /clash.meta/version.txt: -------------------------------------------------------------------------------- 1 | v1.19.10 2 | -------------------------------------------------------------------------------- /mosdns/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.21.1-alpine3.18 as builder 2 | 3 | ARG CGO_ENABLED=0 VERSION 4 | 5 | RUN apk add --no-cache git && \ 6 | git clone --single-branch --depth 1 -b $VERSION https://github.com/IrineSistiana/mosdns.git /source && \ 7 | git clone --single-branch --depth 1 https://github.com/sbwml/luci-app-mosdns.git /patches && \ 8 | cd /source && \ 9 | git apply /patches/mosdns/patches/*.patch && \ 10 | go build -trimpath -ldflags "-s -w" -o mosdns 11 | 12 | 13 | 14 | FROM alpine:3.18.3 15 | 16 | LABEL maintainer="yiKyo " 17 | 18 | ENV TZ="Asia/Shanghai" 19 | 20 | VOLUME ["/etc/.mosdns.d"] 21 | 22 | COPY --from=builder /source/mosdns /usr/local/bin/mosdns 23 | 24 | RUN apk add --no-cache ca-certificates tzdata 25 | 26 | ENTRYPOINT ["/usr/local/bin/mosdns", "start", "-d", "/etc/.mosdns.d"] -------------------------------------------------------------------------------- /mosdns/README: -------------------------------------------------------------------------------- 1 | ## 项目介绍 2 | 3 | [github repo]: https://github.com/yikyo/docker/tree/master/mosdns 4 | 5 | ## 如何使用 6 | 7 | 默认配置目录为 `/etc/.mosdns.d` 8 | 9 | docker run --name mosdns -d \ 10 | -v /path/to/config:/etc/.mosdns.d \ 11 | yikyo/mosdns 12 | -------------------------------------------------------------------------------- /mosdns/version.txt: -------------------------------------------------------------------------------- 1 | v5.3.3 2 | -------------------------------------------------------------------------------- /override/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.21.1-alpine3.18 AS builder 2 | 3 | ARG CGO_ENABLED=0 VERSION 4 | 5 | RUN apk add --no-cache git && \ 6 | git clone --single-branch --depth 1 -b $VERSION https://github.com/linux-do/override.git /source && \ 7 | cd /source && \ 8 | go mod download && \ 9 | go build -ldflags="-w -s" -o override 10 | 11 | 12 | FROM alpine:3.18.3 13 | 14 | LABEL maintainer="yiKyo " 15 | 16 | ENV TZ="Asia/Shanghai" 17 | 18 | WORKDIR /app 19 | 20 | VOLUME ["/app"] 21 | 22 | EXPOSE 8181 23 | 24 | COPY --from=builder /source/override /usr/local/bin/override 25 | 26 | COPY --from=builder /source/config.json.example /app/config.json 27 | 28 | RUN apk add --no-cache ca-certificates tzdata 29 | 30 | ENTRYPOINT ["override"] -------------------------------------------------------------------------------- /override/README: -------------------------------------------------------------------------------- 1 | ## 项目介绍 2 | 3 | [github repo]: https://github.com/yikyo/docker/tree/master/override -------------------------------------------------------------------------------- /override/version.txt: -------------------------------------------------------------------------------- 1 | v0.0.7 2 | --------------------------------------------------------------------------------