This commit is contained in:
Sense T 2024-04-23 14:53:49 +08:00
parent 29948d3c06
commit ce5a32065b
3 changed files with 5 additions and 3 deletions

View File

@ -10,4 +10,4 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12 - uses: cachix/install-nix-action@v12
- name: Building package - name: Building package
run: nix-build . -A defaultPackage.x86_64-linux run: nix build

View File

@ -34,6 +34,7 @@ jobs:
run: | run: |
mkdir -p recored-ui-${GOOS}-${GOARCH} mkdir -p recored-ui-${GOOS}-${GOARCH}
go build -trimpath -ldflags "-w -s" -v -o ./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} tar czvf recored-ui-${GOOS}-${GOARCH}.tgz recored-ui-${GOOS}-${GOARCH}
- name: Build-linux-arm64 - name: Build-linux-arm64
@ -43,6 +44,7 @@ jobs:
run: | run: |
mkdir -p recored-ui-${GOOS}-${GOARCH} mkdir -p recored-ui-${GOOS}-${GOARCH}
go build -trimpath -ldflags "-w -s" -v -o ./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} tar czvf recored-ui-${GOOS}-${GOARCH}.tgz recored-ui-${GOOS}-${GOARCH}
- name: Create Release - name: Create Release

View File

@ -6,9 +6,9 @@ RUN cd web && npm i && npm run build
FROM golang as server FROM golang as server
WORKDIR /src WORKDIR /src
COPY --stage web /src . COPY --from web /src .
RUN go get . && go generate ./... && go build . RUN go get . && go generate ./... && go build .
FROM scratch FROM scratch
COPY --stage server /src/reCoreD-UI . COPY --from server /src/reCoreD-UI .
ENTRYPOINT [ '/reCoreD-UI' ] ENTRYPOINT [ '/reCoreD-UI' ]