Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Docker Build

on:
pull_request:
branches: [ main ]
paths:
- 'Dockerfile.*'
- 'docker-compose.yml'
- '.github/workflows/docker-build.yml'
push:
branches: [ main ]
paths:
- 'Dockerfile.*'
- 'docker-compose.yml'

jobs:
build-cpu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build CPU image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.cpu
push: false
load: true
tags: opencode-uv:cpu-test

- name: Verify image
run: |
docker run --rm opencode-uv:cpu-test bash -c 'echo "CPU build OK"'

build-gpu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build GPU image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.gpu
push: false
load: true
tags: opencode-uv:gpu-test

- name: Verify image
run: |
docker run --rm opencode-uv:gpu-test bash -c 'echo "GPU build OK"'
33 changes: 18 additions & 15 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '0 6 * * 1'
workflow_dispatch:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
check-versions:
runs-on: ubuntu-latest
Expand All @@ -13,7 +16,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Get latest uv version
id: uv
Expand Down Expand Up @@ -53,14 +56,12 @@ jobs:
BUN_CURRENT=$(grep '| Bun |' VERSIONS.md | awk '{print $4}')
OPENCODE_CURRENT=$(grep '| OpenCode |' VERSIONS.md | awk '{print $4}')
OMA_CURRENT=$(grep '| oh-my-openagent |' VERSIONS.md | awk '{print $4}')
DATE_CURRENT=$(grep 'Last verified:' VERSIONS.md | awk '{print $3}')

echo "uv_current=$UV_CURRENT" >> $GITHUB_OUTPUT
echo "node_current=$NODE_CURRENT" >> $GITHUB_OUTPUT
echo "bun_current=$BUN_CURRENT" >> $GITHUB_OUTPUT
echo "opencode_current=$OPENCODE_CURRENT" >> $GITHUB_OUTPUT
echo "oma_current=$OMA_CURRENT" >> $GITHUB_OUTPUT
echo "date_current=$DATE_CURRENT" >> $GITHUB_OUTPUT

- name: Check for version changes
id: changes
Expand All @@ -69,30 +70,33 @@ jobs:
CHANGES=""

if [ "${{ steps.uv.outputs.version }}" != "${{ steps.current.outputs.uv_current }}" ]; then
CHANGES="${CHANGES}uv: ${{ steps.current.outputs.uv_current }} → ${{ steps.uv.outputs.version }}\n"
CHANGES="${CHANGES}- uv: ${{ steps.current.outputs.uv_current }} → ${{ steps.uv.outputs.version }}\n"
fi

if [ "${{ steps.node.outputs.version }}" != "${{ steps.current.outputs.node_current }}" ]; then
CHANGES="${CHANGES}Node.js: ${{ steps.current.outputs.node_current }} → ${{ steps.node.outputs.version }}\n"
CHANGES="${CHANGES}- Node.js: ${{ steps.current.outputs.node_current }} → ${{ steps.node.outputs.version }}\n"
fi

if [ "${{ steps.bun.outputs.version }}" != "${{ steps.current.outputs.bun_current }}" ]; then
CHANGES="${CHANGES}Bun: ${{ steps.current.outputs.bun_current }} → ${{ steps.bun.outputs.version }}\n"
CHANGES="${CHANGES}- Bun: ${{ steps.current.outputs.bun_current }} → ${{ steps.bun.outputs.version }}\n"
fi

if [ "${{ steps.opencode.outputs.version }}" != "${{ steps.current.outputs.opencode_current }}" ]; then
CHANGES="${CHANGES}OpenCode: ${{ steps.current.outputs.opencode_current }} → ${{ steps.opencode.outputs.version }}\n"
CHANGES="${CHANGES}- OpenCode: ${{ steps.current.outputs.opencode_current }} → ${{ steps.opencode.outputs.version }}\n"
fi

if [ "${{ steps.oh-my-openagent.outputs.version }}" != "${{ steps.current.outputs.oma_current }}" ]; then
CHANGES="${CHANGES}oh-my-openagent: ${{ steps.current.outputs.oma_current }} → ${{ steps.oh-my-openagent.outputs.version }}\n"
CHANGES="${CHANGES}- oh-my-openagent: ${{ steps.current.outputs.oma_current }} → ${{ steps.oh-my-openagent.outputs.version }}\n"
fi

if [ -n "$CHANGES" ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
echo -e "changes<<EOF" >> $GITHUB_OUTPUT
echo -e "## Version Changes\n\n$CHANGES\n\nUpdated on: $TODAY" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "changes<<CHANGESEOF" >> $GITHUB_OUTPUT
echo "## Version Changes" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo -e "$CHANGES" >> $GITHUB_OUTPUT
echo "Updated on: $TODAY" >> $GITHUB_OUTPUT
echo "CHANGESEOF" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -120,18 +124,17 @@ jobs:

- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v7
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update tool versions'
title: 'chore: update tool versions'
body: |
## Summary

${{ steps.changes.outputs.changes }}

This PR was automatically created by the version check workflow.
branch: feat/update-versions
delete-branch: true
labels: |
dependencies
automated
automated
4 changes: 2 additions & 2 deletions Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential libgl1 libglib2.0-0 libxrender1 libxext6 \
&& rm -rf /var/lib/apt/lists/*

# ── Node.js 20 ────────────────────────────────────────────────────────────────
RUN curl -fsSL https://nodejs.org/dist/v20.18.0/node-v20.18.0-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1
# ── Node.js 22 ────────────────────────────────────────────────────────────────
RUN curl -fsSL https://nodejs.org/dist/v22.22.2/node-v22.22.2-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1

# ── uv ────────────────────────────────────────────────────────────────────────
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# ── Node.js 20 ────────────────────────────────────────────────────────────────
RUN curl -fsSL https://nodejs.org/dist/v20.18.0/node-v20.18.0-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1
RUN curl -fsSL https://nodejs.org/dist/v22.22.2/node-v22.22.2-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components=1

# ── uv ────────────────────────────────────────────────────────────────────────
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# AI Dev Container

![Docker Build](https://github.com/yursds/docker-opencode/actions/workflows/docker-build.yml/badge.svg)
![Version Check](https://github.com/yursds/docker-opencode/actions/workflows/version-check.yml/badge.svg)

Generic AI-powered development container with OpenCode, uv, Bun, and CUDA support.

---
Expand Down
Loading