This commit is contained in:
@@ -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:1.18.32-bin"
|
||||
"gitea.woggioni.net/woggioni/opencode:1.18.32"
|
||||
"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=2.0.12
|
||||
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-bfs"
|
||||
"gitea.woggioni.net/woggioni/opencode:1.18.32-bfs"
|
||||
|
||||
+4
-5
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +41,7 @@ RUN echo 'PATH DEFAULT=${HOME}/.local/bin:${HOME}/.cargo/bin:/usr/local/bin:/bin
|
||||
RUN rm repository.key
|
||||
RUN --mount=type=cache,target=/var/cache/pacman pacman -Syu --noconfirm
|
||||
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
|
||||
xdg-utils rustup rust-analyzer jdtls python-pipx ripgrep git rustup gradle curl sccache openssh \
|
||||
xdg-utils rustup rust-analyzer python-pipx ripgrep git rustup gradle curl sccache openssh \
|
||||
bash-language-server marksman python-lsp-server vscode-css-languageserver x86_64-unknown-linux-musl-zlib x86_64-unknown-linux-musl-gcc \
|
||||
vscode-html-languageserver vscode-json-languageserver yaml-language-server base-devel docker docker-buildx docker-compose less websocat \
|
||||
npm gtk3 alsa-lib trunk
|
||||
@@ -49,12 +50,10 @@ RUN useradd -m -d /var/lib/opencode opencode
|
||||
RUN mkdir /workspace
|
||||
RUN chown opencode:opencode /workspace
|
||||
USER opencode
|
||||
RUN pipx install pyright
|
||||
RUN pipx install pip-tools
|
||||
USER root
|
||||
ADD --chown=opencode:opencode ./opencode.json /etc/opencode/opencode.json
|
||||
RUN mkdir -p /usr/lib/opencode/addons
|
||||
ADD --chmod=644 https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.46/lombok-1.18.46.jar /usr/lib/opencode/addons/lombok.jar
|
||||
ENV OPENCODE_CONFIG=/etc/opencode/opencode.json
|
||||
USER opencode
|
||||
WORKDIR /workspace
|
||||
|
||||
Reference in New Issue
Block a user