Skip to content

Commit f0229fa

Browse files
committed
feat: add Docker image build to release pipeline
1 parent 96f9cd4 commit f0229fa

4 files changed

Lines changed: 40 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
packages: write
1011

1112
jobs:
1213
release:
@@ -20,6 +21,14 @@ jobs:
2021
with:
2122
go-version-file: go.mod
2223

24+
- uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- uses: docker/setup-buildx-action@v3
31+
2332
- uses: goreleaser/goreleaser-action@v6
2433
with:
2534
version: "~> v2"

.goreleaser.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
version: 2
22

33
builds:
4-
- main: ./main.go
4+
- id: issuebot
5+
main: ./main.go
56
binary: issuebot
67
env:
78
- CGO_ENABLED=0
@@ -30,6 +31,18 @@ homebrew_casks:
3031
description: Autonomous GitHub issue processor powered by any CLI tool
3132
license: MIT
3233

34+
dockers_v2:
35+
- ids:
36+
- issuebot
37+
images:
38+
- ghcr.io/tinybluerobots/issuebot
39+
tags:
40+
- "{{ .Version }}"
41+
- latest
42+
platforms:
43+
- linux/amd64
44+
- linux/arm64
45+
3346
changelog:
3447
sort: asc
3548
filters:

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM scratch
2+
ARG TARGETPLATFORM
3+
COPY ${TARGETPLATFORM}/issuebot /usr/local/bin/issuebot
4+
ENTRYPOINT ["issuebot"]

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ issuebot --local --command "./my-issue-handler.sh {prompt}"
8282
| `--log-file` | | Log file path (defaults to stdout) |
8383
| `--ntfy-topic` | | [ntfy.sh](https://ntfy.sh) topic for error notifications |
8484

85+
### Docker
86+
87+
Mount your CLI tool and any config it needs from the host:
88+
89+
```bash
90+
docker run -v /usr/local/bin/claude:/usr/local/bin/claude \
91+
-v ~/.claude:/root/.claude \
92+
ghcr.io/tinybluerobots/issuebot:latest \
93+
--repo owner/repo --command "claude -p {prompt} --dangerously-skip-permissions"
94+
```
95+
96+
Adjust the mounts for whichever CLI you use (e.g. `copilot`, `gemini`).
97+
8598
### Authentication
8699

87100
Requires a GitHub token. Set `GITHUB_TOKEN` or run `gh auth login`.

0 commit comments

Comments
 (0)