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
61 changes: 61 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,74 @@ on:
- main
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:

jobs:
validate:
if: github.event_name == 'pull_request'
name: Build & Push Docker Image (${{ matrix.variant }})
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- variant: debian
dockerfile: Dockerfile
platforms: linux/amd64,linux/arm64
- variant: alpine
dockerfile: Dockerfile.alpine
platforms: linux/amd64

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Read OpenClaw version from OPENCLAW_VERSION
id: openclaw_version
run: |
VERSION=$(tr -d '[:space:]' < OPENCLAW_VERSION)
if [ -z "$VERSION" ]; then
echo "OPENCLAW_VERSION not found in OPENCLAW_VERSION"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Extract Docker metadata (labels only)
id: meta
uses: docker/metadata-action@v5
with:
images: moltenai/openclaw

- name: Build Docker image (${{ matrix.variant }})
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
push: false
platforms: ${{ matrix.platforms }}
tags: moltenai/openclaw:validate-${{ steps.openclaw_version.outputs.version }}-${{ matrix.variant }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-and-push:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
name: Build & Push Docker Image (${{ matrix.variant }})
runs-on: ubuntu-latest
timeout-minutes: 120
environment: default
strategy:
fail-fast: false
matrix:
include:
- variant: debian
Expand All @@ -29,6 +87,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

Expand Down
2 changes: 1 addition & 1 deletion OPENCLAW_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2026.4.12
2026.4.14
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Alpine tags are currently published for:

[![Build & Push to Docker Hub](https://github.com/Molten-Bot/openclaw/actions/workflows/docker-release.yml/badge.svg)](https://github.com/Molten-Bot/openclaw/actions/workflows/docker-release.yml)

Pull requests run the Docker build matrix as validation; only `main` pushes and `v*` tags publish images to Docker Hub.

## Usage

```bash
Expand Down
Loading