
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
My Broken Link Checker 是一个GitHub Action,用于检查静态文件或网页中的断链。该工具基于https://github.com/raviqqe/muffet%E5%AE%9E%E7%8E%B0URL%E6%A3%80%E6%9F%A5%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%8F%AF%E5%AE%9A%E6%9C%9F%E5%AF%B9%E7%BD%91%E7%AB%99%E8%BF%9B%E8%A1%8C%E6%96%AD%E9%93%BE%E6%A3%80%E6%B5%8B%EF%BC%8C%E4%B9%9F%E5%8F%AF%E4%B8%8EHugo%E3%80%81MkDocs%E3%80%81Gatsby%E7%AD%89%E9%9D%99%E6%80%81%E7%AB%99%E7%82%B9%E7%94%9F%E6%88%90%E5%99%A8%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8%EF%BC%8C%E5%9C%A8%E6%9E%84%E5%BB%BA%E8%BF%87%E7%A8%8B%E4%B8%AD%E9%AA%8C%E8%AF%81%E9%93%BE%E6%8E%A5%E6%9C%89%E6%95%88%E6%80%A7%E3%80%82
| 环境变量 | 默认值 | 描述 |
|---|---|---|
INPUT_CMD_PARAMS | --buffer-size=8192 --max-connections=10 --color=always --verbose | muffet工具的命令行参数,详细说明见https://github.com/raviqqe/muffet/blob/master/arguments.go#L16-L34 |
INPUT_DEBUG | false | 启用entrypoint.sh脚本的调试模式(set -x) |
INPUT_PAGES_PATH | 本地网页文件目录的相对路径 | |
INPUT_RUN_TIMEOUT | 300 | 检查任务的最大运行时间(秒) |
INPUT_URL | (必填) | 需要检查的URL地址 |
1. 定期检查远程网页
yamlon: schedule: - cron: '0 0 * * 0' # 每周日执行 name: 检查Markdown链接 jobs: broken-link-check: name: 断链检查 runs-on: ubuntu-latest steps: - name: 执行检查 uses: ruzickap/action-my-broken-link-checker@v1 with: url: https://www.google.com cmd_params: "--one-page-only --color=always" # 仅检查单页
2. 结合静态站点生成器检查本地文件
yaml- name: 检查本地网页链接 uses: ruzickap/action-my-broken-link-checker@v1 with: url: https://www.example.com/test123 pages_path: ./build/ # 本地静态文件目录 cmd_params: --buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification --limit-redirections=5 --timeout=20 run_timeout: 600 # 超时时间设为10分钟
3. 脚本模式运行(跳过Docker构建)
yaml- name: 脚本模式检查链接 env: INPUT_URL: https://www.example.com/test123 INPUT_PAGES_PATH: ./build/ INPUT_CMD_PARAMS: --buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification # 使用本地文件时需--skip-tls-verification run: wget -qO- https://raw.githubusercontent.com/ruzickap/action-my-broken-link-checker/v1/entrypoint.sh | bash
yamlname: 构建与检查 on: push: branches: - master jobs: build-deploy: runs-on: ubuntu-latest steps: - name: 创建测试网页 run: | mkdir -v public cat > public/index.html << EOF <!DOCTYPE html> <html> <head> 存储在my-testing-domain.com的测试页面 </head> <body> 链接: <ul> <li><a href="https://my-testing-domain.com">https://my-testing-domain.com</a></li> <li><a href="https://my-testing-domain.com:443">https://my-testing-domain.com:443</a></li> </ul> </body> </html> EOF - name: 脚本模式检查链接 env: INPUT_URL: https://my-testing-domain.com INPUT_PAGES_PATH: ./public/ INPUT_CMD_PARAMS: "--skip-tls-verification --verbose --color=always" INPUT_RUN_TIMEOUT: 100 INPUT_DEBUG: true run: wget -qO- https://raw.githubusercontent.com/ruzickap/action-my-broken-link-checker/v1/entrypoint.sh | bash - name: 容器模式检查链接 uses: ruzickap/action-my-broken-link-checker@v1 with: url: https://my-testing-domain.com pages_path: ./public/ cmd_params: "--skip-tls-verification --verbose --color=always" run_timeout: 10 debug: true
1. 直接运行脚本
bashexport INPUT_URL="https://google.com" export INPUT_CMD_PARAMS="--ignore-fragments --one-page-only --max-connections=10 --color=always --verbose" ./entrypoint.sh
2. 使用Docker容器运行
bashexport INPUT_URL="https://google.com" export INPUT_CMD_PARAMS="--ignore-fragments --one-page-only --max-connections=10 --color=always --verbose" docker run --rm -t -e INPUT_URL -e INPUT_CMD_PARAMS peru/my-broken-link-checker
3. 检查本地文件目录
bashexport INPUT_URL="https://my-testing-domain.com" export INPUT_PAGES_PATH="${PWD}/tests/" # 本地网页文件目录 export INPUT_CMD_PARAMS="--skip-tls-verification --verbose --color=always" docker run --rm -t -e INPUT_URL -e INPUT_CMD_PARAMS -e INPUT_PAGES_PATH -v "$INPUT_PAGES_PATH:$INPUT_PAGES_PATH" peru/my-broken-link-checker
仓库名称建议与域名一致,例如仓库awsugcz/awsug.cz对应网站https://awsug.cz。工作流配置示例:
yamlname: hugo-build on: pull_request: types: [opened, synchronize] push: jobs: hugo-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: 检出子模块 shell: bash run: | auth_header="$(git config --local --get http.https://github.com/.extraheader)" git submodule sync --recursive git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: 配置Hugo uses: peaceiris/actions-hugo@v2 with: hugo-version: '0.62.0' - name: 构建网页 run: | hugo --gc cp LICENSE README.md public/ echo "${{ github.event.repository.name }}" > public/CNAME - name: 检查断链 env: INPUT_URL: https://${{ github.event.repository.name }} INPUT_PAGES_PATH: public INPUT_CMD_PARAMS: --verbose --buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification --exclude=linkedin.com run: | wget -qO- https://raw.githubusercontent.com/ruzickap/action-my-broken-link-checker/v1/entrypoint.sh | bash - name: 部署 uses: peaceiris/actions-gh-pages@v3 if: github.event_name == 'push' && github.ref == 'refs/heads/master' env: ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} PUBLISH_BRANCH: gh-pages PUBLISH_DIR: public with: forceOrphan: true
仓库名称建议作为子路径,例如仓库ruzickap/k8s-harbor对应网站https://ruzickap.github.io/k8s-harbor。工作流配置示例:
yamlname: vuepress-build-check-deploy on: pull_request: types: [opened, synchronize] paths: - .github/workflows/vuepress-build-check-deploy.yml - docs/** - package.json - package-lock.json push: paths: - .github/workflows/vuepress-build-check-deploy.yml - docs/** - package.json - package-lock.json jobs: vuepress-build-check-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: 安装Node.js 12 uses: actions/setup-node@v1 with: node-version: 12.x - name: 安装VuePress并构建文档 run: | npm install npm run build cp LICENSE docs/.vuepress/dist sed -e "s@(part-@(https://github.com/${GITHUB_REPOSITORY}/tree/master/docs/part-@" -e 's@.\/.vuepress\/public\/@./@' docs/README.md > docs/.vuepress/dist/README.md - name: 检查断链 env: INPUT_URL: https://${{ github.event.repository.owner.name }}.github.io/${{ github.event.repository.name }} INPUT_PAGES_PATH: . INPUT_CMD_PARAMS: --buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification run: | ln -s docs/.vuepress/dist ${{ github.event.repository.name }} wget -qO- https://raw.githubusercontent.com/ruzickap/action-my-broken-link-checker/v1/entrypoint.sh | bash - name: 部署 uses: peaceiris/actions-gh-pages@v3 if: github.event_name == 'push' && github.ref == 'refs/heads/master' env: ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} PUBLISH_BRANCH: gh-pages PUBLISH_DIR: ./docs/.vuepress/dist with: forceOrphan: true
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

来自真实用户的反馈,见证轩辕镜像的优质服务