Skip to content

Commit eb22f4c

Browse files
committed
feat: migrate to Docker Action
1 parent 66f66b3 commit eb22f4c

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM golang:1.24-alpine AS builder
2+
3+
WORKDIR /app
4+
5+
COPY go.mod go.sum ./
6+
RUN go mod download
7+
8+
COPY . .
9+
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /simili ./cmd/simili/main.go
10+
11+
FROM alpine:latest
12+
13+
# Install git and ca-certificates (needed for git operations and https)
14+
RUN apk add --no-cache ca-certificates git
15+
16+
COPY --from=builder /simili /bin/simili
17+
18+
ENTRYPOINT ["/bin/simili"]

action.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'Simili - Issue Intelligence'
2+
description: 'AI-powered duplicate detection and similar issue finder with cross-repo search.'
3+
author: 'Kavirubc'
4+
branding:
5+
icon: 'search'
6+
color: 'purple'
7+
8+
inputs:
9+
command:
10+
description: 'Command to run (process, index, etc.)'
11+
required: false
12+
default: 'process'
13+
config_path:
14+
description: 'Path to the simili configuration file'
15+
required: false
16+
default: '.github/simili.yaml'
17+
dry_run:
18+
description: 'Run in read-only mode'
19+
required: false
20+
default: 'false'
21+
github_token:
22+
description: 'GitHub token'
23+
required: false
24+
default: ${{ github.token }}
25+
transfer_token:
26+
description: 'GitHub token with elevated permissions for transfers'
27+
required: false
28+
29+
runs:
30+
using: 'docker'
31+
image: 'Dockerfile'
32+
args:
33+
- ${{ inputs.command }}
34+
- --issue
35+
- /github/workflow/event.json
36+
- --config
37+
- ${{ inputs.config_path }}
38+
- ${{ inputs.dry_run == 'true' && '--dry-run' || '' }}
39+
## - --verbose # Optional, consistent with previous behavior?
40+
41+
env:
42+
GITHUB_TOKEN: ${{ inputs.github_token }}
43+
TRANSFER_TOKEN: ${{ inputs.transfer_token }}
44+
# Pass other env vars if needed, like GEMINI_API_KEY, but user usually sets them in workflow `env`
45+
# Docker actions inherit `env` set in the workflow step?
46+
# Actually, args are passed, but environment variables declared in workflow `env:` key ARE passed to the container.

0 commit comments

Comments
 (0)