Fix Docker build: pass OpenCode version to installer and use correct repo

This commit is contained in:
Chris Scott committed 2026-01-13 00:02:30 -05:00
1 parent 1915b1e765
commit 43a456317b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
id: versions
run: |
UV_VERSION=$(git ls-remote --tags --sort=-v:refname https://github.com/astral-sh/uv.git 'refs/tags/[0-9]*' | head -1 | sed 's/.*refs\/tags\///')
OPENCODE_VERSION=$(git ls-remote --tags --sort=-v:refname https://github.com/opencode-ai/opencode.git 'refs/tags/v*' | head -1 | sed 's/.*refs\/tags\///')
OPENCODE_VERSION=$(curl -s https://api.github.com/repos/anomalyco/opencode/releases/latest | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')
echo "uv=${UV_VERSION}" >> $GITHUB_OUTPUT
echo "opencode=${OPENCODE_VERSION}" >> $GITHUB_OUTPUT
echo "Detected versions: uv=${UV_VERSION}, opencode=${OPENCODE_VERSION}"
+1 -1
View File
@@ -65,7 +65,7 @@ RUN echo "Installing uv=${UV_VERSION} opencode=${OPENCODE_VERSION}" && \
mv /root/.local/bin/uv /usr/local/bin/uv && \
mv /root/.local/bin/uvx /usr/local/bin/uvx && \
chmod +x /usr/local/bin/uv /usr/local/bin/uvx && \
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path && \
curl -fsSL https://opencode.ai/install | bash -s -- --version ${OPENCODE_VERSION} --no-modify-path && \
mv /root/.opencode /opt/opencode && \
chmod -R 755 /opt/opencode && \
ln -s /opt/opencode/bin/opencode /usr/local/bin/opencode