Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
51b13ce0
authored
Feb 11, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update CI
parent
04860419
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
.github/workflows/docker-image-arm64.yml
+1
-0
Dockerfile
+11
-2
No files found.
.github/workflows/docker-image-arm64.yml
View file @
51b13ce0
...
...
@@ -51,6 +51,7 @@ jobs:
images
:
|
calciumion/new-api
ghcr.io/${{ github.repository }}
-
name
:
Build and push Docker images
uses
:
docker/build-push-action@v3
with
:
...
...
Dockerfile
View file @
51b13ce0
...
...
@@ -7,18 +7,27 @@ COPY ./web .
COPY
./VERSION .
RUN
DISABLE_ESLINT_PLUGIN
=
'true'
VITE_REACT_APP_VERSION
=
$(
cat
VERSION
)
bun run build
FROM
golang AS builder2
FROM
golang:alpine AS builder2
RUN
apk add
--no-cache
\
gcc
\
musl-dev
\
sqlite-dev
\
build-base
ENV
GO111MODULE=on \
CGO_ENABLED=1 \
GOOS=linux
WORKDIR
/build
ADD
go.mod go.sum ./
RUN
go mod download
COPY
. .
COPY
--from=builder /build/dist ./web/dist
RUN
go build
-ldflags
"-s -w -X 'one-api/common.Version=
$(
cat
VERSION
)
' -extldflags '-static'"
-o
one-api
RUN
go build
-trimpath
-ldflags
"-s -w -X 'one-api/common.Version=
$(
cat
VERSION
)
' -linkmode external -extldflags '-static'"
-o
one-api
FROM
alpine
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment