fix: support OpenCode auth in read-only executor

This commit is contained in:
2026-07-16 21:25:05 +02:00
parent 46affd3fd7
commit 3fa0206faa
3 changed files with 14 additions and 24 deletions
+6 -7
View File
@@ -16,11 +16,10 @@ RUN apk add --no-cache ca-certificates coreutils git openssh-client \
/var/lib/gitea-agent/state \
/var/lib/gitea-agent/workspaces \
/var/lib/opencode-agent/data \
/var/lib/opencode-agent/state \
/var/lib/opencode-agent/cache \
&& install -d -o root -g root -m 0555 \
/opt/ci-agents \
/opt/ci-agents/empty-config \
/opt/ci-agents/empty-config/opencode
/opt/ci-agents
COPY --from=app-build /src/app/dist /opt/ci-agents/dist
COPY --from=app-build /src/app/node_modules /opt/ci-agents/node_modules
@@ -59,12 +58,12 @@ RUN npm install --global --omit=dev "opencode-ai@${OPENCODE_VERSION}" \
&& rm -f "/tmp/${asset}" /tmp/gitea-mcp
COPY opencode /opt/ci-agents/opencode
RUN chmod -R a-w /opt/ci-agents \
&& chown ci-agent /opt/ci-agents/empty-config/opencode \
&& chmod u+w /opt/ci-agents/empty-config/opencode
RUN touch /opt/ci-agents/opencode/.gitignore \
&& chmod -R a-w /opt/ci-agents
ENV XDG_DATA_HOME=/var/lib/opencode-agent/data \
XDG_CONFIG_HOME=/opt/ci-agents/empty-config \
XDG_CONFIG_HOME=/var/lib/opencode-agent/state \
XDG_STATE_HOME=/var/lib/opencode-agent/state \
XDG_CACHE_HOME=/var/lib/opencode-agent/cache \
OPENCODE_CONFIG_DIR=/opt/ci-agents/opencode \
OPENCODE_DISABLE_PROJECT_CONFIG=true \