Compare commits
18
Commits
with-opencode
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b557fab2f2 | ||
|
|
37a1856ca7 | ||
|
|
0e98878992 | ||
|
|
4659d43e8e | ||
|
|
3e4d095425 | ||
|
|
dcf978fe92 | ||
|
|
481bdf789a | ||
|
|
15359e391e | ||
|
|
3336fdb5cd | ||
|
|
4a26c2bdfc | ||
|
|
689859881a | ||
|
|
4028ef3dad | ||
|
|
89297fb827 | ||
|
|
d608f491f1 | ||
|
|
7ec98f4835 | ||
|
|
aa79292f6e | ||
|
|
165ab9bc29 | ||
|
|
2871706c47 |
@@ -0,0 +1,72 @@
|
|||||||
|
name: Build Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build image on tag
|
||||||
|
runs-on: host-shell
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
|
# - name: Set up Docker Buildx
|
||||||
|
# uses: https://gitee.com/gitea-actions/setup-buildx-action@v3 # 推荐使用 Gitee/Gitea 国内镜像
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
uses: https://gitee.com/gitea-actions/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.cn-shanghai.aliyuncs.com
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Show build context
|
||||||
|
run: |
|
||||||
|
echo "Ref: ${{ github.ref }}"
|
||||||
|
echo "Tag: ${GITHUB_REF_NAME}"
|
||||||
|
echo "Runner: $(uname -a)"
|
||||||
|
|
||||||
|
- name: Build Image
|
||||||
|
run: |
|
||||||
|
docker build -t opencode-custom:latest -t registry.cn-shanghai.aliyuncs.com/taochen/opencode-custom:latest .
|
||||||
|
|
||||||
|
- name: Verify image
|
||||||
|
run: |
|
||||||
|
docker images | grep opencode-custom
|
||||||
|
docker run --rm opencode-custom:latest --version
|
||||||
|
|
||||||
|
- name: Push Image
|
||||||
|
run: |
|
||||||
|
docker push registry.cn-shanghai.aliyuncs.com/taochen/opencode-custom:latest
|
||||||
|
|
||||||
|
- name: Notify release via Bark
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
TITLE="${{ github.ref_name }}"
|
||||||
|
STATUS="${{ job.status }}"
|
||||||
|
if [ "${STATUS}" = "success" ]; then
|
||||||
|
EMOJI="✅"
|
||||||
|
else
|
||||||
|
EMOJI="❌"
|
||||||
|
fi
|
||||||
|
BODY="${EMOJI} opencode-custom:latest image build ${STATUS}\n branch ${{ github.ref_name }}\n workflow ${{ github.workflow }}\n run ${{ github.run_id }}"
|
||||||
|
PAYLOAD=$(cat <<EOF
|
||||||
|
{
|
||||||
|
"device_key": "6ZFVsxM95cuAjYoNLWSWaN",
|
||||||
|
"title": "${TITLE} - image build ${STATUS}",
|
||||||
|
"body": "${BODY}",
|
||||||
|
"group": "Gitea",
|
||||||
|
"isArchive": 1,
|
||||||
|
"ttl": 3600
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
curl -s \
|
||||||
|
-X POST http://101.43.40.124:81/push \
|
||||||
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
|
-d "${PAYLOAD}"
|
||||||
@@ -115,3 +115,7 @@ The two non-pipeline skills (`logic-planner` taxonomy details, `sql-review` chec
|
|||||||
- **Pipeline status changes** — never collapse gates without user confirmation. The pipeline's value comes from each stage being a separate, re-runnable hand-off; inlining them couples them.
|
- **Pipeline status changes** — never collapse gates without user confirmation. The pipeline's value comes from each stage being a separate, re-runnable hand-off; inlining them couples them.
|
||||||
- **Triggers in `description:` frontmatter** — these are what Claude Code matches against user prompts. Be specific (input contract + concrete trigger phrases). Vague triggers cause skill over-invocation.
|
- **Triggers in `description:` frontmatter** — these are what Claude Code matches against user prompts. Be specific (input contract + concrete trigger phrases). Vague triggers cause skill over-invocation.
|
||||||
- **Stale path references** — the bundled SKILL.md / scripts use `.claude/skills/...` paths from an earlier layout. When updating validator instructions, prefer the actual paths (`skills/...` on host, `/root/.config/opencode/skills/...` in image).
|
- **Stale path references** — the bundled SKILL.md / scripts use `.claude/skills/...` paths from an earlier layout. When updating validator instructions, prefer the actual paths (`skills/...` on host, `/root/.config/opencode/skills/...` in image).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- claude --resume a70186ab-eddf-442f-a7c9-6d3aa638f7f4 -->
|
||||||
+10
-5
@@ -64,11 +64,16 @@ RUN uv pip install \
|
|||||||
--index-url https://pypi.tuna.tsinghua.edu.cn/simple/ \
|
--index-url https://pypi.tuna.tsinghua.edu.cn/simple/ \
|
||||||
--requirements /tmp/requirements.txt
|
--requirements /tmp/requirements.txt
|
||||||
|
|
||||||
# 3. 在最终镜像中用正规的 npm 安装 opencode-ai,确保系统全局软链接生成完整
|
|
||||||
RUN npm install -g opencode-ai && npm cache clean --force
|
|
||||||
RUN opencode --version
|
|
||||||
|
|
||||||
COPY skills /root/.config/opencode/skills
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& curl -fsSL https://mimo.xiaomi.com/install | bash
|
||||||
|
|
||||||
|
ENV PATH="/root/.mimocode/bin:${PATH}"
|
||||||
|
RUN mkdir -p /root/workspace
|
||||||
|
COPY skills /root/.config/mimocode/skills
|
||||||
COPY csv2json /root/workspace/csv2json
|
COPY csv2json /root/workspace/csv2json
|
||||||
|
|
||||||
ENTRYPOINT ["opencode"]
|
ENTRYPOINT ["mimo"]
|
||||||
|
|||||||
Reference in New Issue
Block a user