From e9f489ac75e95b89eb015b2a2b9c9d2b49cad40a Mon Sep 17 00:00:00 2001 From: James Doyle Date: Sun, 15 Feb 2026 16:42:13 -0800 Subject: [PATCH 1/3] ci: add Docker image publishing to GoReleaser workflow --- .github/workflows/goreleaser.yml | 5 +++++ .goreleaser.yaml | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index b6e2af4..8b80533 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -7,6 +7,7 @@ on: permissions: contents: write + packages: write jobs: goreleaser: @@ -22,6 +23,9 @@ jobs: with: go-version-file: 'go.mod' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: @@ -30,3 +34,4 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + Owner: ${{ github.repository_owner }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fddb2aa..e3e5d8f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,6 +8,9 @@ version: 2 +env: + - Owner={{ .Env.Owner }} + before: hooks: # You may remove this if you don't use go modules. @@ -43,6 +46,15 @@ archives: - goos: windows formats: [zip] +docker: + - image_templates: + - ghcr.io/{{ .Env.Owner }}/clawlet:{{ .Version }} + - ghcr.io/{{ .Env.Owner }}/clawlet:latest + dockerfile: Dockerfile + platforms: + - linux/amd64 + - linux/arm64 + changelog: sort: asc filters: From 9c26109c18301f49dbeac0801e8355f345396bab Mon Sep 17 00:00:00 2001 From: James Doyle Date: Mon, 16 Feb 2026 10:13:54 -0800 Subject: [PATCH 2/3] ci: update GitHub Actions workflow to support Docker image builds and releases --- .github/workflows/goreleaser.yml | 7 +++++++ .goreleaser.yaml | 15 ++++++++++----- Dockerfile.goreleaser | 15 +++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 Dockerfile.goreleaser diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 8b80533..1b6e2fa 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -26,6 +26,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e3e5d8f..f280493 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -46,11 +46,16 @@ archives: - goos: windows formats: [zip] -docker: - - image_templates: - - ghcr.io/{{ .Env.Owner }}/clawlet:{{ .Version }} - - ghcr.io/{{ .Env.Owner }}/clawlet:latest - dockerfile: Dockerfile +dockers_v2: + - id: clawlet + dockerfile: Dockerfile.goreleaser + ids: + - clawlet + images: + - "ghcr.io/{{ .Env.Owner }}/clawlet" + tags: + - "{{ .Tag }}" + - "latest" platforms: - linux/amd64 - linux/arm64 diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaser new file mode 100644 index 0000000..4a124a1 --- /dev/null +++ b/Dockerfile.goreleaser @@ -0,0 +1,15 @@ +FROM alpine:latest + +ARG TARGETPLATFORM + +RUN apk add --no-cache ca-certificates + +COPY $TARGETPLATFORM/clawlet /usr/local/bin/clawlet + +# Create config directory +RUN mkdir -p /root/.clawlet + +EXPOSE 18790 + +ENTRYPOINT ["clawlet"] +CMD ["status"] From 42e1b52c26c695825f27ea092e8cf90545a586d6 Mon Sep 17 00:00:00 2001 From: James Doyle Date: Mon, 16 Feb 2026 10:30:12 -0800 Subject: [PATCH 3/3] docs: Add GHRC Docker usage instructions to README --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a581c20..5222f2d 100644 --- a/README.md +++ b/README.md @@ -320,7 +320,28 @@ clawlet cron add --message "ping" --every 600 --channel slack --to U012345 ``` ## 🐳 Docker -Build and run clawlet in a container: +### Using Pre-built Images + +Pre-built images are available on GitHub Container Registry: + +```yaml +# docker-compose.yml +services: + clawlet: + image: ghcr.io/mosaxiv/clawlet:latest + volumes: + - ~/.clawlet:/root/.clawlet + ports: + - "18790:18790" + command: gateway + restart: unless-stopped +``` + +```bash +docker compose up -d +``` + +### Building Locally ```bash # Build the image