From e467762441f69f93cc9225844679568448b8c053 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Tue, 22 Sep 2026 20:37:47 +0800 Subject: [PATCH] revert opencode to version 1.x --- .gitea/workflows/build-opencode.yaml | 40 ++++++++++++++-------------- opencode/Dockerfile | 5 ++-- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/build-opencode.yaml b/.gitea/workflows/build-opencode.yaml index f114850..c94bc21 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=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 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: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,7 +45,7 @@ jobs: ssh: default=/var/lib/gitea-runner/.ssh/id_ed25519 target: release build-args: | - OPENCODE_VERSION=2.0.12 + OPENCODE_VERSION=1.18.32 BUN_VERSION=1.4.2 platforms: | linux/amd64 diff --git a/opencode/Dockerfile b/opencode/Dockerfile index ee6c6eb..a928e52 100644 --- a/opencode/Dockerfile +++ b/opencode/Dockerfile @@ -14,12 +14,13 @@ 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/cli/script/build.ts --single -RUN --mount=type=cache,target=/home/builder/.bun/install/cache,uid=1126 ./packages/cli/script/build.ts --single +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