🤖 ci(docker): auto-build on push to main + fix root Dockerfile swag step (#94)
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 17s
Docker Push / Docker Push (push) Successful in 4m57s
CI/CD Pipeline / CI Pipeline (push) Failing after 6m18s
CI/CD Pipeline / Trigger Docker Push (push) Has been skipped

Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
This commit was merged in pull request #94.
This commit is contained in:
2026-05-06 07:06:09 +02:00
committed by arcodange
parent 63b892b10f
commit 849383d6c8
2 changed files with 19 additions and 1 deletions

View File

@@ -14,6 +14,13 @@ RUN go mod download
# Copy entire source code
COPY . .
# Generate Swagger documentation if not already present
# (pkg/server/docs/ is gitignored ; the binary //go:embed depends on it)
RUN if [ ! -f pkg/server/docs/swagger.json ]; then \
go install github.com/swaggo/swag/cmd/swag@latest && \
cd pkg/server && go generate ; \
fi
# Build the server binary
RUN go build -o app ./cmd/server