From ce5a32065b61c606d14a929c1f1e46bebf978b67 Mon Sep 17 00:00:00 2001 From: Sense T Date: Tue, 23 Apr 2024 14:53:49 +0800 Subject: [PATCH] ci-test --- .github/workflows/build_nix.yml | 2 +- .github/workflows/go.yml | 2 ++ Dockerfile | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_nix.yml b/.github/workflows/build_nix.yml index 2f684e1..67d5b37 100644 --- a/.github/workflows/build_nix.yml +++ b/.github/workflows/build_nix.yml @@ -10,4 +10,4 @@ jobs: - uses: actions/checkout@v2 - uses: cachix/install-nix-action@v12 - name: Building package - run: nix-build . -A defaultPackage.x86_64-linux + run: nix build diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 42a0a67..2ffc07f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,6 +34,7 @@ jobs: run: | mkdir -p recored-ui-${GOOS}-${GOARCH} go build -trimpath -ldflags "-w -s" -v -o ./recored-ui-${GOOS}-${GOARCH} ./... + cp README.md LICENSE recored-ui-${GOOS}-${GOARCH} tar czvf recored-ui-${GOOS}-${GOARCH}.tgz recored-ui-${GOOS}-${GOARCH} - name: Build-linux-arm64 @@ -43,6 +44,7 @@ jobs: run: | mkdir -p recored-ui-${GOOS}-${GOARCH} go build -trimpath -ldflags "-w -s" -v -o ./recored-ui-${GOOS}-${GOARCH} ./... + cp README.md LICENSE recored-ui-${GOOS}-${GOARCH} tar czvf recored-ui-${GOOS}-${GOARCH}.tgz recored-ui-${GOOS}-${GOARCH} - name: Create Release diff --git a/Dockerfile b/Dockerfile index cb66abc..c01a54f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ RUN cd web && npm i && npm run build FROM golang as server WORKDIR /src -COPY --stage web /src . +COPY --from web /src . RUN go get . && go generate ./... && go build . FROM scratch -COPY --stage server /src/reCoreD-UI . +COPY --from server /src/reCoreD-UI . ENTRYPOINT [ '/reCoreD-UI' ]