
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Image Actions是由Calibre性能专家开发的GitHub Action,该Docker镜像封装了此Action,可自动压缩Pull Request中的JPEG、PNG和WebP图片。它提供以下核心特性:
.github/workflows/calibreapp-image-actions.yml文件,内容如下:ymlname: Compress Images on: pull_request: paths: - '**.jpg' - '**.jpeg' - '**.png' - '**.webp' jobs: build: if: github.event.pull_request.head.repo.full_name == github.repository name: calibreapp/image-actions runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@master - name: Compress Images uses: calibreapp/image-actions@master with: githubToken: ${{ secrets.GITHUB_TOKEN }}
通过以下参数调整压缩质量:
ymlwith: jpegQuality: '80' # JPEG质量(1-100,默认80) jpegProgressive: false # 是否启用渐进式JPEG pngQuality: '80' # PNG质量(1-100,默认80) webpQuality: '80' # WebP质量(1-100,默认80)
使用逗号分隔的通配符字符串忽略特定路径:
ymlwith: ignorePaths: 'node_modules/**,build'
跳过提交和评论,仅生成压缩结果:
ymlwith: compressOnly: true
结合workflow_dispatch(手动触发)或schedule(定时任务)实现灵活压缩:
ymlname: Compress Images on: workflow_dispatch: schedule: - cron: '00 23 * * 0' # 每周日23:00运行 jobs: build: name: calibreapp/image-actions runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@master - name: Compress Images id: calibre uses: calibreapp/image-actions@master with: githubToken: ${{ secrets.GITHUB_TOKEN }} compressOnly: true - name: Create PR If Needed if: steps.calibre.outputs.markdown != '' uses: peter-evans/create-pull-request@master with: title: 夜间图片压缩 branch-suffix: timestamp commit-message: 压缩图片 body: ${{ steps.calibre.outputs.markdown }}
默认不支持分叉仓库PR,可通过以下方式解决:
GITHUB_TOKEN(需注意安全)ymlif: github.event.pull_request.head.repo.full_name == github.repository
若使用旧版本,需更新:
docker://格式改为calibreapp/image-actions@master,并使用with传递githubToken.github/calibre/image-actions.yml迁移到.github/workflows/目录npm installnpm run build或npm run watch(实时编译)npm run testdocker build -t calibreapp/image-actions:dev .本镜像基于GNU General Public License授权。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





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