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
runs-on: imgbuilder
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build binary
run: make backend
- name: Build and push image
uses: https://gitea.konchin.com/action/docker@main
with:
registry-certificate: ${{ vars.ROOTCA }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
target: build-run

View File

@@ -4,7 +4,7 @@ WORKDIR /work
COPY . .
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
WORKDIR /work
@@ -12,7 +12,7 @@ WORKDIR /work
ENTRYPOINT ["/work/backend"]
CMD ["serve"]
FROM docker.io/library/debian:13-slim AS testing
FROM docker.io/library/debian:13-slim AS native
COPY backend /work/backend
WORKDIR /work

View File

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