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
12 changes: 12 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
packages: write

jobs:
goreleaser:
Expand All @@ -22,6 +23,16 @@ jobs:
with:
go-version-file: 'go.mod'

- 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:
Expand All @@ -30,3 +41,4 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Owner: ${{ github.repository_owner }}
17 changes: 17 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

version: 2

env:
- Owner={{ .Env.Owner }}

before:
hooks:
# You may remove this if you don't use go modules.
Expand Down Expand Up @@ -43,6 +46,20 @@ archives:
- goos: windows
formats: [zip]

dockers_v2:
- id: clawlet
dockerfile: Dockerfile.goreleaser
ids:
- clawlet
images:
- "ghcr.io/{{ .Env.Owner }}/clawlet"
tags:
- "{{ .Tag }}"
- "latest"
platforms:
- linux/amd64
- linux/arm64

changelog:
sort: asc
filters:
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -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"]
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down