[PR #808] [MERGED] move to new repo #1046

Closed
opened 2026-03-03 01:07:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/certimate-go/certimate/pull/808
Author: @fudiwei
Created: 6/17/2025
Status: Merged
Merged: 6/22/2025
Merged by: @fudiwei

Base: mainHead: new-repo


📝 Commits (10+)

  • e7ce127 refactor: remove zod.trim() validators
  • 8149034 refactor: rename utils
  • 4752c49 refactor: modify directory structure
  • 4ac3618 refactor: abstractions
  • 312047e fix: int64 overflow
  • 9421da2 bump vertion to v0.3.18
  • 299a722 refactor: re-impl sdk3rd
  • 30840bb refactor: modify directory structure
  • 205275b chore: move '/internal/pkg' to '/pkg'
  • b8bbbee chore: change repo

📊 Changes

888 files changed (+15592 additions, -13413 deletions)

View changed files

📝 .github/ISSUE_TEMPLATE/1-bug_report.yml (+3 -3)
📝 .github/ISSUE_TEMPLATE/2-feature_request.yml (+3 -3)
📝 .github/ISSUE_TEMPLATE/3-questions.yml (+2 -2)
📝 .github/workflows/push_image.yml (+2 -3)
📝 .github/workflows/push_image_next.yml (+2 -2)
📝 .github/workflows/release.yml (+4 -6)
📝 .goreleaser.yml (+3 -3)
📝 CHANGELOG.md (+1 -1)
📝 CONTRIBUTING.md (+73 -45)
📝 CONTRIBUTING_EN.md (+70 -47)
📝 LICENSE (+1 -0)
📝 README.md (+19 -18)
📝 README_EN.md (+20 -19)
📝 docker/docker-compose.yml (+2 -2)
📝 go.mod (+4 -4)
📝 internal/applicant/acme_ca.go (+1 -1)
📝 internal/applicant/acme_user.go (+10 -10)
📝 internal/applicant/applicant.go (+7 -7)
📝 internal/applicant/providers.go (+82 -82)
📝 internal/certificate/service.go (+9 -9)

...and 80 more files

📄 Description

该 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
  • 更新文档站 https://github.com/certimate-go/docs/pull/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.
    

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/certimate-go/certimate/pull/808 **Author:** [@fudiwei](https://github.com/fudiwei) **Created:** 6/17/2025 **Status:** ✅ Merged **Merged:** 6/22/2025 **Merged by:** [@fudiwei](https://github.com/fudiwei) **Base:** `main` ← **Head:** `new-repo` --- ### 📝 Commits (10+) - [`e7ce127`](https://github.com/certimate-go/certimate/commit/e7ce12772acfe85707aeb630139495b2ab3f0e05) refactor: remove zod.trim() validators - [`8149034`](https://github.com/certimate-go/certimate/commit/8149034bdcb4a78bc0ccf68c464bc4ca243460c7) refactor: rename utils - [`4752c49`](https://github.com/certimate-go/certimate/commit/4752c49fed97e5b373020b529c077a819dac1950) refactor: modify directory structure - [`4ac3618`](https://github.com/certimate-go/certimate/commit/4ac3618f7ef0e79e0ffcb885943956409975d8bd) refactor: abstractions - [`312047e`](https://github.com/certimate-go/certimate/commit/312047e0ee42b02c8da44d63482b447830161f3d) fix: int64 overflow - [`9421da2`](https://github.com/certimate-go/certimate/commit/9421da2cdea5f1e65a3e0767a585781af859f7a4) bump vertion to v0.3.18 - [`299a722`](https://github.com/certimate-go/certimate/commit/299a722aa9334d04479b71f68c94c0e79d264b5f) refactor: re-impl sdk3rd - [`30840bb`](https://github.com/certimate-go/certimate/commit/30840bbba5f2e17ce6f18db2180ebc51f0ef6993) refactor: modify directory structure - [`205275b`](https://github.com/certimate-go/certimate/commit/205275b52deb4ea9d881386f95d3faeb13a1a5d8) chore: move '/internal/pkg' to '/pkg' - [`b8bbbee`](https://github.com/certimate-go/certimate/commit/b8bbbee1e0f767d3eb9cfd4f140dbcb700604dba) chore: change repo ### 📊 Changes **888 files changed** (+15592 additions, -13413 deletions) <details> <summary>View changed files</summary> 📝 `.github/ISSUE_TEMPLATE/1-bug_report.yml` (+3 -3) 📝 `.github/ISSUE_TEMPLATE/2-feature_request.yml` (+3 -3) 📝 `.github/ISSUE_TEMPLATE/3-questions.yml` (+2 -2) 📝 `.github/workflows/push_image.yml` (+2 -3) 📝 `.github/workflows/push_image_next.yml` (+2 -2) 📝 `.github/workflows/release.yml` (+4 -6) 📝 `.goreleaser.yml` (+3 -3) 📝 `CHANGELOG.md` (+1 -1) 📝 `CONTRIBUTING.md` (+73 -45) 📝 `CONTRIBUTING_EN.md` (+70 -47) 📝 `LICENSE` (+1 -0) 📝 `README.md` (+19 -18) 📝 `README_EN.md` (+20 -19) 📝 `docker/docker-compose.yml` (+2 -2) 📝 `go.mod` (+4 -4) 📝 `internal/applicant/acme_ca.go` (+1 -1) 📝 `internal/applicant/acme_user.go` (+10 -10) 📝 `internal/applicant/applicant.go` (+7 -7) 📝 `internal/applicant/providers.go` (+82 -82) 📝 `internal/certificate/service.go` (+9 -9) _...and 80 more files_ </details> ### 📄 Description 该 PR 包含以下内容变更: - **feat**: 为前端站点添加 `robots.txt`。 - **chore**: 转让仓库准备工作。 - **chore**: 将 `/internal/pkg` 下的模块移动至 `/pkg` 下,并调整了部分模块的目录结构。 --- TODO List: - [x] 转让仓库(见附录 1) CC @usual2970 - [x] 替换文档中出现的仓库地址: - `https://github.com/usual2970/certimate` → `https://github.com/certimate-go/certimate` - [x] 替换文档中出现的镜像地址: - `usual2970/certimate` → `certimate/certimate` - `registry.cn-shanghai.aliyuncs.com/usual2970/certimate` → `registry.cn-shanghai.aliyuncs.com/certimate/certimate` - [x] 替换 GitHub Actions 相关 Secrets:CC @usual2970 - Docker Hub 用户名及 Token - Aliyun Container Registry AK/SK - GitHub Release Token - [x] 同步镜像(见附录 2) - [x] Docker Hub - [x] Aliyun Container Registry - [x] 镜像仓库(见附录 3)CC @usual2970 - [x] 更新文档站 https://github.com/certimate-go/docs/pull/7 --- ### 附录 1:转让仓库 > [《GitHub Docs: Transferring a repository》](https://docs.github.com/zh/repositories/creating-and-managing-repositories/transferring-a-repository) ### 附录 2:同步镜像 > [《Docker Docs: Move images》](https://docs.docker.com/docker-hub/repos/manage/hub-images/move/) 计划仅同步 v0.3 (v0.3.0 ~ v0.3.18) 版本的镜像。 <details> <summary> (<b>展开脚本</b>) </summary> ```bash #!/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" ``` </details> ### 附录 3:镜像仓库 镜像流程: 1. fork 仓库到 `usual2970/certimate`; 2. 关闭 Issues / Pull requests / Discussions / Project / Wiki 等功能; 3. `git checkout --orphan mirror` 新建孤儿分支 `mirror` 并设置为仓库默认分支,删除所有文件,仅保留 `REAMDE.md`,内容如下,以引导来自外部链接访问的重定向: ```markdown > [!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 中的升级提醒: ```markdown > [!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. ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:07:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#1046
No description provided.