diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..1e378b7 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,39 @@ +# Builds the custom OpenClaw image and pushes it to Gitea's container registry. +# Runs on every push to main, weekly (to pick up new OpenClaw releases), or manually. +# Requires repo secrets REGISTRY_USER and REGISTRY_TOKEN (token with package:write). + +name: Build OpenClaw image + +on: + push: + branches: [main] + schedule: + - cron: "0 4 * * 1" # Mondays 04:00 + workflow_dispatch: + +env: + REGISTRY: gitea.davidgailleton.me + IMAGE: gitea.davidgailleton.me/da7e/openclaw-brew + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - uses: docker/build-push-action@v6 + with: + context: . + pull: true # always fetch the newest base OpenClaw image + push: true + tags: | + ${{ env.IMAGE }}:latest + ${{ env.IMAGE }}:${{ github.sha }} \ No newline at end of file