- Removed GitHub Dependencies: Excised the unused newGithubClient and its associated dependencies (google/go-github and oauth2) from main.go and go.mod.
- Project Infrastructure Updates:
- Updated Dockerfile to use golang:1.25 for consistency with go.mod.
- Modified action.yaml to run from the local Dockerfile, ensuring that the Forgejo-specific logic is utilized.
- Validation: Verified all changes through a successful build and by running the full test suite, all of which passed.
11 lines
324 B
Docker
11 lines
324 B
Docker
FROM golang:1.25 AS builder
|
|
COPY . /var/app
|
|
WORKDIR /var/app
|
|
RUN go mod tidy
|
|
RUN CGO_ENABLED=0 go build -o app .
|
|
|
|
FROM alpine:3.23
|
|
LABEL org.opencontainers.image.source=https://github.com/trstringer/manual-approval
|
|
RUN apk update && apk add ca-certificates
|
|
COPY --from=builder /var/app/app /var/app/app
|
|
CMD ["/var/app/app"]
|