Implement action as a Go program

This commit is contained in:
Alessio
2025-04-19 16:32:18 -07:00
parent 5ff8e37c61
commit e5f708931a
10 changed files with 493 additions and 7 deletions

View File

@@ -1,9 +1,17 @@
from golang:alpine as builder
run apk add sqlite-dev build-base
copy . /code
workdir /code
env CGO_ENABLED=1
run go build -ldflags="-w -s -linkmode=external -extldflags=-static" -o sqlite_lint ./cmd/main.go
# ---
from alpine:3.20
run apk add sqlite
COPY --from=builder /code/sqlite_lint /
copy entrypoint.sh /
copy lints.sql /
run chmod +x /entrypoint.sh
entrypoint ["/entrypoint.sh"]
entrypoint ["/sqlite_lint"]