Archived
fix: support OpenCode auth in read-only executor
This commit is contained in:
+6
-7
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user