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
74 changes: 6 additions & 68 deletions .github/workflows/auto_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,73 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
submodules: true
fetch-depth: 0

- name: Get current submodule commit
id: current
run: echo "sha=$(git -C openclaw rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Fetch latest upstream release
id: upstream
node-version: "22"
- run: npx @dappnode/dappnodesdk github-action bump-upstream
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LATEST=$(gh api repos/openclaw/openclaw/releases/latest --jq '.tag_name')
echo "tag=$LATEST" >> "$GITHUB_OUTPUT"
# Strip leading 'v' if present for the version string
VERSION="${LATEST#v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Update submodule to latest release
id: update
run: |
cd openclaw
git fetch --tags origin
git checkout ${{ steps.upstream.outputs.tag }}
cd ..
NEW_SHA=$(git -C openclaw rev-parse HEAD)
echo "sha=$NEW_SHA" >> "$GITHUB_OUTPUT"

- name: Check if update is needed
id: check
run: |
if [ "${{ steps.current.outputs.sha }}" = "${{ steps.update.outputs.sha }}" ]; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Update upstream version in dappnode_package.json
if: steps.check.outputs.changed == 'true'
run: |
VERSION=${{ steps.upstream.outputs.version }}
jq --arg v "$VERSION" '.upstreamVersion = $v' dappnode_package.json > tmp.json && mv tmp.json dappnode_package.json

- name: Create PR
if: steps.check.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.upstream.outputs.version }}
BRANCH="bump-upstream/v${VERSION}"

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Check if branch already exists on remote
if git ls-remote --heads origin "$BRANCH" | grep -q "$BRANCH"; then
echo "Branch $BRANCH already exists, skipping"
exit 0
fi

git checkout -b "$BRANCH"
git add openclaw dappnode_package.json
git commit -m "Bump openclaw upstream to ${VERSION}"
git push origin "$BRANCH"

gh pr create \
--title "Bump openclaw upstream to ${VERSION}" \
--body "Bumps openclaw submodule to release \`${{ steps.upstream.outputs.tag }}\`." \
--base main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}
24 changes: 10 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
name: "Main"
on:
repository_dispatch:
pull_request:
push:
branches:
- "main"
- "v[0-9]+.[0-9]+.[0-9]+"
paths-ignore:
- "README.md"

jobs:
build-test:
runs-on: ipfs-dev-gateway
name: Build test
if: github.event_name != 'push'
build-hash:
runs-on: ubuntu-latest
name: Build and post IPFS hash
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: npx @dappnode/dappnodesdk build --provider http://10.200.200.7:5001 --timeout 1h
- run: npx @dappnode/dappnodesdk github-action build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}

release:
name: Release
runs-on: ipfs-dev-gateway
if: github.event_name == 'push' || github.event_name == 'repository_dispatch'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'repository_dispatch'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: "22"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Former git submodule (now installed via npm at build time)
openclaw/

# Build artifacts
build_*/
*.xz
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

24 changes: 6 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ ARG UPSTREAM_VERSION="latest"

FROM node:22-bookworm

# Install Bun (required for build scripts) and sudo (needed by openclaw tool executor)
# Install Bun (required by openclaw at runtime) and sudo (needed by openclaw tool executor)
RUN curl -fsSL https://bun.sh/install | bash && \
apt-get update && \
apt-get install -y --no-install-recommends sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.bun/bin:${PATH}"

RUN corepack enable

WORKDIR /app

ARG OPENCLAW_DOCKER_APT_PACKAGES=""
Expand All @@ -22,21 +20,11 @@ RUN if [ -n "$OPENCLAW_DOCKER_APT_PACKAGES" ]; then \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*; \
fi

COPY openclaw/package.json openclaw/pnpm-lock.yaml openclaw/pnpm-workspace.yaml openclaw/.npmrc ./
COPY openclaw/ui/package.json ./ui/package.json
COPY openclaw/patches ./patches
COPY openclaw/scripts ./scripts

RUN pnpm install --frozen-lockfile

COPY openclaw/ .
RUN OPENCLAW_A2UI_SKIP_MISSING=1 pnpm build
# Force pnpm for UI build (Bun may fail on ARM/Synology architectures)
ENV OPENCLAW_PREFER_PNPM=1
RUN pnpm ui:build
ARG UPSTREAM_VERSION
RUN npm install -g openclaw@${UPSTREAM_VERSION}

# Make the openclaw CLI available in PATH
RUN ln -s /app/openclaw.mjs /usr/local/bin/openclaw
# Make json5 (openclaw dependency) resolvable by plain require('json5')
ENV NODE_PATH=/usr/local/lib/node_modules

ENV NODE_ENV=production

Expand Down Expand Up @@ -66,4 +54,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \

# Run as root (no-new-privileges prevents privilege escalation via gosu/sudo)
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["node", "dist/index.js", "gateway", "--allow-unconfigured"]
CMD ["openclaw", "gateway", "--allow-unconfigured"]
4 changes: 2 additions & 2 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openclaw.dnp.dappnode.eth",
"version": "0.1.0",
"upstreamVersion": "2026.3.1",
"upstreamVersion": "2026.3.2",
"upstreamRepo": "openclaw/openclaw",
"upstreamArg": "UPSTREAM_VERSION",
"shortDescription": "Personal AI assistant gateway with multi-LLM support",
Expand Down Expand Up @@ -89,4 +89,4 @@
"featuredBackground": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
"featuredColor": "white"
}
}
}
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
context: .
dockerfile: Dockerfile
args:
UPSTREAM_VERSION: "latest"
UPSTREAM_VERSION: "2026.3.2"
image: "openclaw.dnp.dappnode.eth:0.1.0"
container_name: DAppNodePackage-openclaw.dnp.dappnode.eth
restart: unless-stopped
Expand All @@ -26,8 +26,7 @@ services:
max-size: "10m"
max-file: "3"
command:
- "node"
- "dist/index.js"
- "openclaw"
- "gateway"
- "--allow-unconfigured"

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ EOF
else
node -e "
const fs = require('fs');
const JSON5 = require('/app/node_modules/json5');
const JSON5 = require('json5');
const configPath = '$CONFIG_FILE';
try {
const config = JSON5.parse(fs.readFileSync(configPath, 'utf8'));
Expand Down
1 change: 0 additions & 1 deletion openclaw
Submodule openclaw deleted from d76b22