From c2c0cbedfe5c2106bcbf0b0922d7573220d1376d Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Mon, 28 Sep 2026 06:32:07 +0800 Subject: [PATCH] bump opencode to 2.0.18 --- .gitea/workflows/build-opencode.yaml | 42 ++++++++++++++-------------- opencode/Dockerfile | 10 +++---- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/build-opencode.yaml b/.gitea/workflows/build-opencode.yaml index db8c7c2..70d13bc 100644 --- a/.gitea/workflows/build-opencode.yaml +++ b/.gitea/workflows/build-opencode.yaml @@ -17,25 +17,25 @@ jobs: registry: gitea.woggioni.net username: woggioni password: ${{ secrets.PUBLISHER_TOKEN }} - - - name: Build and push opencode binary images - uses: docker/build-push-action@v6 - with: - builder: multiplatform-builder - context: "{{defaultContext}}:opencode" - ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519 - target: release-bin - build-args: | - OPENCODE_VERSION=1.18.32 - BUN_VERSION=1.4.2 - platforms: | - linux/amd64 - push: true - pull: true - tags: | - "gitea.woggioni.net/woggioni/opencode:1.18.32-bin" - "gitea.woggioni.net/woggioni/opencode:1.18.32" - "gitea.woggioni.net/woggioni/opencode:latest" + # - + # name: Build and push opencode binary images + # uses: docker/build-push-action@v6 + # with: + # builder: multiplatform-builder + # context: "{{defaultContext}}:opencode" + # ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519 + # target: release-bin + # build-args: | + # OPENCODE_VERSION=2.0.12 + # BUN_VERSION=1.4.2 + # platforms: | + # linux/amd64 + # push: true + # pull: true + # tags: | + # "gitea.woggioni.net/woggioni/opencode:2.0.12-bin" + # "gitea.woggioni.net/woggioni/opencode:2.0.12" + # "gitea.woggioni.net/woggioni/opencode:latest" - name: Build and push opencode build-from-source images uses: docker/build-push-action@v6 @@ -45,11 +45,11 @@ jobs: ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519 target: release build-args: | - OPENCODE_VERSION=1.18.32 + OPENCODE_VERSION=2.0.18 BUN_VERSION=1.4.2 platforms: | linux/amd64 push: true pull: true tags: | - "gitea.woggioni.net/woggioni/opencode:1.18.32-bfs" + "gitea.woggioni.net/woggioni/opencode:2.0.18-bfs" diff --git a/opencode/Dockerfile b/opencode/Dockerfile index 56ef349..993ae2b 100644 --- a/opencode/Dockerfile +++ b/opencode/Dockerfile @@ -2,6 +2,7 @@ ARG BUN_VERSION FROM oven/bun:${BUN_VERSION}-slim AS build ARG OPENCODE_VERSION +ARG BUN_VERSION # RUN --mount=type=cache,target=/var/cache/apk apk update # RUN --mount=type=cache,target=/var/cache/apk apk add python3 make g++ npm zip git RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ @@ -14,13 +15,12 @@ USER builder WORKDIR /home/builder ADD --chown=builder:builder --keep-git-dir=true git@github.com:anomalyco/opencode.git#v${OPENCODE_VERSION} opencode WORKDIR /home/builder/opencode - ENV BUN_COMPILE_RELEASE=bun-v${BUN_VERSION} ENV OPENCODE_CHANNEL=prod ENV OPENCODE_VERSION=${OPENCODE_VERSION} -RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 bun install -ADD --chown=builder:builder ./build.ts ./packages/opencode/script/build.ts -RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 ./packages/opencode/script/build.ts +RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 bun install --frozen-lockfile --ignore-scripts +#ADD --chown=builder:builder ./build.ts ./packages/cli/script/build.ts --single +RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 ./packages/cli/script/build.ts --single --baseline --skip-install @@ -62,6 +62,6 @@ VOLUME ["/var/lib/opencode", "/workspace"] FROM base-release AS release -COPY --from=build --chown=root:root /home/builder/opencode/packages/opencode/dist/opencode-linux-x64/bin/opencode /usr/bin/opencode +COPY --from=build --chown=root:root /home/builder/opencode/packages/cli/dist/cli-linux-x64/bin/opencode /usr/bin/opencode FROM base-release AS release-bin ADD --unpack https://github.com/anomalyco/opencode/releases/download/v${OPENCODE_VERSION}/opencode-linux-x64.tar.gz /usr/bin