Skip to content

move to new repo#808

Merged
fudiwei merged 19 commits intocertimate-go:mainfrom
fudiwei:new-repo
Jun 22, 2025
Merged

move to new repo#808
fudiwei merged 19 commits intocertimate-go:mainfrom
fudiwei:new-repo

Conversation

@fudiwei
Copy link
Copy Markdown
Member

@fudiwei fudiwei commented Jun 17, 2025

该 PR 包含以下内容变更:

  • feat: 为前端站点添加 robots.txt
  • chore: 转让仓库准备工作。
  • chore: 将 /internal/pkg 下的模块移动至 /pkg 下,并调整了部分模块的目录结构。

TODO List:

  • 转让仓库(见附录 1) CC @usual2970
  • 替换文档中出现的仓库地址:
    • https://github.com/usual2970/certimatehttps://github.com/certimate-go/certimate
  • 替换文档中出现的镜像地址:
    • usual2970/certimatecertimate/certimate
    • registry.cn-shanghai.aliyuncs.com/usual2970/certimateregistry.cn-shanghai.aliyuncs.com/certimate/certimate
  • 替换 GitHub Actions 相关 Secrets:CC @usual2970
    • Docker Hub 用户名及 Token
    • Aliyun Container Registry AK/SK
    • GitHub Release Token
  • 同步镜像(见附录 2)
    • Docker Hub
    • Aliyun Container Registry
  • 镜像仓库(见附录 3)CC @usual2970
  • 更新文档站 move to new repo docs#7

附录 1:转让仓库

《GitHub Docs: Transferring a repository》

附录 2:同步镜像

《Docker Docs: Move images》

计划仅同步 v0.3 (v0.3.0 ~ v0.3.18) 版本的镜像。

展开脚本
#!/bin/bash

DOCKER_HUB_USERNAME="<username>"
DOCKER_HUB_TOKEN="<token>"

echo "$DOCKER_HUB_TOKEN" | docker login --username "$DOCKER_HUB_USERNAME" --password-stdin "$REGISTRY"

export DOCKER_CLI_EXPERIMENTAL=enabled

SOURCE_IMAGE="usual2970/certimate"
TARGET_IMAGE="certimate/certimate"
REGISTRY="docker.io"

sync_multiarch_tag() {
    local tag=$1

    echo "================================"

    echo "处理平台 linux/amd64 ..."
    local temp_tag="${TARGET_IMAGE}:${tag}-linux-amd64"
    docker pull --platform linux/amd64 "${SOURCE_IMAGE}:${tag}"
    docker tag "${SOURCE_IMAGE}:${tag}" "$temp_tag"
    docker push "$temp_tag"
    
    echo "处理平台 linux/arm64 ..."
    local temp_tag="${TARGET_IMAGE}:${tag}-linux-arm64"
    docker pull --platform linux/arm64 "${SOURCE_IMAGE}:${tag}"
    docker tag "${SOURCE_IMAGE}:${tag}" "$temp_tag"
    docker push "$temp_tag"
    
    echo "创建多架构 manifest..."
    docker manifest create "${TARGET_IMAGE}:${tag}" "${TARGET_IMAGE}:${tag}-linux-amd64" "${TARGET_IMAGE}:${tag}-linux-arm64" --amend
    docker manifest annotate --arch amd64 "${TARGET_IMAGE}:${tag}" "${TARGET_IMAGE}:${tag}-linux-amd64"
    docker manifest annotate --arch arm64 "${TARGET_IMAGE}:${tag}" "${TARGET_IMAGE}:${tag}-linux-arm64"
    docker manifest inspect "${TARGET_IMAGE}:${tag}"
    
    echo "推送镜像..."
    docker manifest push "${TARGET_IMAGE}:${tag}"
    
    echo "删除临时镜像..."
    docker rmi "${TARGET_IMAGE}:${tag}"
    docker rmi "${TARGET_IMAGE}:${tag}-linux-amd64"
    docker rmi "${TARGET_IMAGE}:${tag}-linux-arm64"
    docker manifest rm "${TARGET_IMAGE}:${tag}"
}

# 同步固定版本
for i in {0..18}; do
    VERSION="v0.3.${i}"
    sync_multiarch_tag "$VERSION"
done

# 同步别名 v0.3 & latest
sync_multiarch_tag "v0.3"
sync_multiarch_tag "latest"

docker logout "$REGISTRY"

附录 3:镜像仓库

镜像流程:

  1. fork 仓库到 usual2970/certimate
  2. 关闭 Issues / Pull requests / Discussions / Project / Wiki 等功能;
  3. git checkout --orphan mirror 新建孤儿分支 mirror 并设置为仓库默认分支,删除所有文件,仅保留 REAMDE.md,内容如下,以引导来自外部链接访问的重定向:
    > [!IMPORTANT]
    >
    > 主仓库已转移至 [certimate-go/certimate](https://github.com/certimate-go/certimate),此仓库不再接受 Issue 及 PR。
    >
    > The repo has been transfered to [certimate-go/certimate](https://github.com/certimate-go/certimate).
  4. 基于 mirror 分支新建标签 v0.3.19,并新建 Release(无需 Docker 镜像和二进制分发),内容如下,以触发旧版本用户 WebUI 中的升级提醒:
    > [!IMPORTANT]
    > 
    > 此版本无功能性更新,仅标记仓库转移至 [certimate-go/certimate](https://github.com/certimate-go/certimate)
    > 如果你正在使用 Docker 部署 Certimate,请切换镜像名 `usual2970/certimate``certimate/certimate`。原镜像后续不再有版本更新。
    > 
    > This version has no functional updates. It only indicates that the repo has been transfered to [certimate-go/certimate](https://github.com/certimate-go/certimate).
    > If you are running Certimate under Docker, please switch the image from `usual2970/certimate` to `certimate/certimate`. The original image will no longer receive version updates in the future.

@fudiwei fudiwei merged commit 34887cb into certimate-go:main Jun 22, 2025
@fudiwei fudiwei deleted the new-repo branch June 22, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant