Build OpenClaw Image #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build OpenClaw Image | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| openclawTag: | |
| default: "2026.2.3" | |
| description: "OpenClaw Release Tag 2026.2.3, etc." | |
| required: true | |
| dockerhubTag: | |
| default: "2026.2.3" | |
| description: "Docker Hub Tag" | |
| required: false | |
| platforms: | |
| description: "Platforms" | |
| default: "linux/amd64,linux/arm64/v8" | |
| required: true | |
| pushLatest: | |
| description: "Push latest tag" | |
| default: "true" | |
| required: true | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| 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: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Download Source | |
| run: | | |
| set -euo pipefail | |
| mkdir -p _src/openclaw | |
| curl -fsSL "https://github.com/openclaw/openclaw/archive/refs/tags/v${{ github.event.inputs.openclawTag }}.tar.gz" \ | |
| | tar -xz -C _src/openclaw --strip-components=1 | |
| - name: Build OpenClaw Image and Push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: _src/openclaw | |
| file: openclaw/Dockerfile | |
| platforms: ${{ github.event.inputs.platforms || 'linux/amd64,linux/arm64/v8' }} | |
| push: true | |
| tags: | | |
| 1panel/openclaw:${{ github.event.inputs.dockerhubTag || github.event.inputs.openclawTag }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Push Latest Tag | |
| if: ${{ github.event_name == 'push' || github.event.inputs.pushLatest == 'true' }} | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: _src/openclaw | |
| file: openclaw/Dockerfile | |
| platforms: ${{ github.event.inputs.platforms || 'linux/amd64,linux/arm64/v8' }} | |
| push: true | |
| tags: | | |
| 1panel/openclaw:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |