Fix: specify build target
All checks were successful
Go test / run-go-vet (push) Successful in 6s
Go test / check-swagger-up-to-date (push) Successful in 9s
Go test / run-go-test (push) Successful in 25s
Go test / cleanup-go-test (push) Successful in 13s
Go test / release-image (push) Successful in 3m32s

This commit is contained in:
2025-12-09 02:09:37 +08:00
parent efc3f1ad89
commit 87ae3b76c2
3 changed files with 4 additions and 7 deletions

View File

@@ -54,13 +54,10 @@ jobs:
- run-go-test - run-go-test
runs-on: imgbuilder runs-on: imgbuilder
steps: steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build binary
run: make backend
- name: Build and push image - name: Build and push image
uses: https://gitea.konchin.com/action/docker@main uses: https://gitea.konchin.com/action/docker@main
with: with:
registry-certificate: ${{ vars.ROOTCA }} registry-certificate: ${{ vars.ROOTCA }}
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
target: build-run

View File

@@ -4,7 +4,7 @@ WORKDIR /work
COPY . . COPY . .
RUN make backend RUN make backend
FROM docker.io/library/debian:13-slim AS run FROM docker.io/library/debian:13-slim AS build-run
COPY --from=build /work/backend /work/backend COPY --from=build /work/backend /work/backend
WORKDIR /work WORKDIR /work
@@ -12,7 +12,7 @@ WORKDIR /work
ENTRYPOINT ["/work/backend"] ENTRYPOINT ["/work/backend"]
CMD ["serve"] CMD ["serve"]
FROM docker.io/library/debian:13-slim AS testing FROM docker.io/library/debian:13-slim AS native
COPY backend /work/backend COPY backend /work/backend
WORKDIR /work WORKDIR /work

View File

@@ -62,7 +62,7 @@ services:
backend: backend:
build: build:
context: . context: .
target: testing target: native
env_file: env_file:
- path: ./.env - path: ./.env
required: false required: false