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
Unverified
Commit
c609cb13
authored
Apr 28, 2026
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update logo paths in README
parent
a42b3976
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
144 additions
and
254 deletions
+144
-254
.github/FUNDING.yml
+0
-12
.github/workflows/docker-build.yml
+138
-54
.github/workflows/docker-image-arm64.yml
+0
-182
README.en.md
+1
-1
README.fr.md
+1
-1
README.ja.md
+1
-1
README.md
+1
-1
README.zh_CN.md
+1
-1
README.zh_TW.md
+1
-1
No files found.
.github/FUNDING.yml
deleted
100644 → 0
View file @
a42b3976
# These are supported funding model platforms
github
:
# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon
:
# Replace with a single Patreon username
open_collective
:
# Replace with a single Open Collective username
ko_fi
:
# Replace with a single Ko-fi username
tidelift
:
# Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge
:
# Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay
:
# Replace with a single Liberapay username
issuehunt
:
# Replace with a single IssueHunt username
otechie
:
# Replace with a single Otechie username
custom
:
[
'
https://afdian.com/a/new-api'
]
# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
.github/workflows/docker-build.yml
View file @
c609cb13
name
:
Build and Push Docker Image
name
:
Publish Docker image (Multi-arch)
on
:
on
:
push
:
push
:
branches
:
branches
:
-
main
-
main
tags
:
tags
:
-
'
v*'
-
'
*'
-
'
!nightly*'
workflow_dispatch
:
workflow_dispatch
:
inputs
:
env
:
tag
:
DOCKER_REPO
:
t0ngyu/new-api-alpha
description
:
'
Tag
name
to
build
(e.g.,
v0.10.8)'
required
:
false
type
:
string
jobs
:
jobs
:
build-and-push
:
build_single_arch
:
runs-on
:
ubuntu-latest
name
:
Build & push (${{ matrix.arch }})
strategy
:
fail-fast
:
false
matrix
:
include
:
-
arch
:
amd64
platform
:
linux/amd64
runner
:
ubuntu-latest
-
arch
:
arm64
platform
:
linux/arm64
runner
:
ubuntu-24.04-arm
runs-on
:
${{ matrix.runner }}
outputs
:
tag
:
${{ steps.version.outputs.tag }}
is_tag
:
${{ steps.version.outputs.is_tag }}
permissions
:
packages
:
write
contents
:
read
id-token
:
write
steps
:
steps
:
-
name
:
Checkout code
-
name
:
Check out
uses
:
actions/checkout@v5
uses
:
actions/checkout@v4
with
:
fetch-depth
:
${{ github.event_name == 'workflow_dispatch' && 0 || 1 }}
ref
:
${{ github.event.inputs.tag || github.ref }}
-
name
:
Save version info
-
name
:
Resolve version
id
:
version
run
:
|
run
:
|
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
IS_TAG=false
# For tags, use the tag name
if [ -n "${{ github.event.inputs.tag }}" ]; then
echo "${GITHUB_REF#refs/tags/}" > VERSION
TAG="${{ github.event.inputs.tag }}"
if ! git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then
echo "::error::Tag '$TAG' does not exist"
exit 1
fi
IS_TAG=true
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
TAG="${GITHUB_REF#refs/tags/}"
IS_TAG=true
else
else
# For branches, use date and commit hash
TAG="$(date +'%Y%m%d')-$(git rev-parse --short HEAD)"
echo "$(date +'%Y%m%d')-$(git rev-parse --short HEAD)" > VERSION
fi
fi
cat VERSION
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo "is_tag=${IS_TAG}" >> $GITHUB_OUTPUT
echo "${TAG}" > VERSION
echo "Building version: ${TAG} for ${{ matrix.arch }}"
-
name
:
Set up QEMU
-
name
:
Compute image tags
uses
:
docker/setup-qemu-action@v4
id
:
tags
run
:
|
TAGS="calciumion/new-api:${TAG}-${{ matrix.arch }}"
if [ "${{ steps.version.outputs.is_tag }}" = "true" ]; then
TAGS="${TAGS}"$'\n'"calciumion/new-api:latest-${{ matrix.arch }}"
else
TAGS="${TAGS}"$'\n'"calciumion/new-api:main-${{ matrix.arch }}"
fi
{
echo "tags<<EOF"
echo "${TAGS}"
echo "EOF"
} >> $GITHUB_OUTPUT
-
name
:
Set up Docker Buildx
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v4
uses
:
docker/setup-buildx-action@v3
with
:
driver-opts
:
|
image=moby/buildkit:latest
network=host
-
name
:
Login to Docker Hub
-
name
:
Log
in to Docker Hub
uses
:
docker/login-action@v
4
uses
:
docker/login-action@v
3
with
:
with
:
username
:
${{ secrets.DOCKER_USERNAME }}
username
:
${{ secrets.DOCKER
HUB
_USERNAME }}
password
:
${{ secrets.DOCKER
_PASSWORD
}}
password
:
${{ secrets.DOCKER
HUB_TOKEN
}}
-
name
:
Extract metadata
-
name
:
Extract metadata
(labels)
id
:
meta
id
:
meta
uses
:
docker/metadata-action@v
6
uses
:
docker/metadata-action@v
5
with
:
with
:
images
:
${{ env.DOCKER_REPO }}
images
:
calciumion/new-api
tags
:
|
type=ref,event=branch
-
name
:
Build & push
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
-
name
:
Build and push Docker image
id
:
build
id
:
build
uses
:
docker/build-push-action@v
7
uses
:
docker/build-push-action@v
6
with
:
with
:
context
:
.
context
:
.
file
:
./Dockerfile
platforms
:
${{ matrix.platform }}
platforms
:
linux/amd64
push
:
true
push
:
true
tags
:
${{ steps.
meta
.outputs.tags }}
tags
:
${{ steps.
tags
.outputs.tags }}
labels
:
${{ steps.meta.outputs.labels }}
labels
:
${{ steps.meta.outputs.labels }}
# Enable BuildKit cache mounts and GHA cache
cache-from
:
type=gha
cache-from
:
type=gha
cache-to
:
type=gha,mode=max
cache-to
:
type=gha,mode=max
build-args
:
|
provenance
:
mode=max
BUILDKIT_INLINE_CACHE=1
sbom
:
true
-
name
:
Install cosign
if
:
steps.version.outputs.is_tag == 'true'
uses
:
sigstore/cosign-installer@v3
-
name
:
Sign image with cosign
if
:
steps.version.outputs.is_tag == 'true'
run
:
cosign sign --yes calciumion/new-api@${{ steps.build.outputs.digest }}
-
name
:
Image summary
-
name
:
Image summary
run
:
|
run
:
|
echo "### Docker Image Built Successfully! 🚀" >> $GITHUB_STEP_SUMMARY
echo "### Docker Image Digest (${{ matrix.arch }})" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Tags:**" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
echo "calciumion/new-api:${TAG}-${{ matrix.arch }}" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.build.outputs.digest }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Digest:** \`${{ steps.build.outputs.digest }}\`" >> $GITHUB_STEP_SUMMARY
create_manifests
:
name
:
Create multi-arch manifests
needs
:
[
build_single_arch
]
runs-on
:
ubuntu-latest
steps
:
-
name
:
Set version
run
:
echo "TAG=${{ needs.build_single_arch.outputs.tag }}" >> $GITHUB_ENV
-
name
:
Log in to Docker Hub
uses
:
docker/login-action@v3
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Create & push manifest (version)
run
:
|
docker buildx imagetools create \
-t calciumion/new-api:${TAG} \
calciumion/new-api:${TAG}-amd64 \
calciumion/new-api:${TAG}-arm64
-
name
:
Create & push manifest (latest)
if
:
needs.build_single_arch.outputs.is_tag == 'true'
run
:
|
docker buildx imagetools create \
-t calciumion/new-api:latest \
calciumion/new-api:latest-amd64 \
calciumion/new-api:latest-arm64
-
name
:
Create & push manifest (main)
if
:
needs.build_single_arch.outputs.is_tag != 'true'
run
:
|
docker buildx imagetools create \
-t calciumion/new-api:main \
calciumion/new-api:main-amd64 \
calciumion/new-api:main-arm64
-
name
:
Manifest summary
run
:
|
echo "### Multi-arch Manifest" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
docker buildx imagetools inspect calciumion/new-api:${TAG} >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
.github/workflows/docker-image-arm64.yml
deleted
100644 → 0
View file @
a42b3976
name
:
Publish Docker image (Multi Registries, native amd64+arm64)
on
:
push
:
tags
:
-
'
*'
-
'
!nightly*'
workflow_dispatch
:
inputs
:
tag
:
description
:
'
Tag
name
to
build
(e.g.,
v0.10.8-alpha.3)'
required
:
true
type
:
string
jobs
:
build_single_arch
:
name
:
Build & push (${{ matrix.arch }}) [native]
strategy
:
fail-fast
:
false
matrix
:
include
:
-
arch
:
amd64
platform
:
linux/amd64
runner
:
ubuntu-latest
-
arch
:
arm64
platform
:
linux/arm64
runner
:
ubuntu-24.04-arm
runs-on
:
${{ matrix.runner }}
permissions
:
packages
:
write
contents
:
read
id-token
:
write
steps
:
-
name
:
Check out
uses
:
actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
# v4
with
:
fetch-depth
:
${{ github.event_name == 'workflow_dispatch' && 0 || 1 }}
ref
:
${{ github.event.inputs.tag || github.ref }}
-
name
:
Resolve tag & write VERSION
run
:
|
if [ -n "${{ github.event.inputs.tag }}" ]; then
TAG="${{ github.event.inputs.tag }}"
# Verify tag exists
if ! git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then
echo "Error: Tag '$TAG' does not exist in the repository"
exit 1
fi
else
TAG=${GITHUB_REF#refs/tags/}
fi
echo "TAG=$TAG" >> $GITHUB_ENV
echo "$TAG" > VERSION
echo "Building tag: $TAG for ${{ matrix.arch }}"
# - name: Normalize GHCR repository
# run: echo "GHCR_REPOSITORY=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
# v3
-
name
:
Log in to Docker Hub
uses
:
docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
# v3
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
# - name: Log in to GHCR
# uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
-
name
:
Extract metadata (labels)
id
:
meta
uses
:
docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
# v5
with
:
images
:
|
calciumion/new-api
# ghcr.io/${{ env.GHCR_REPOSITORY }}
-
name
:
Build & push single-arch (to both registries)
id
:
build
uses
:
docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
# v6
with
:
context
:
.
platforms
:
${{ matrix.platform }}
push
:
true
tags
:
|
calciumion/new-api:${{ env.TAG }}-${{ matrix.arch }}
calciumion/new-api:latest-${{ matrix.arch }}
# ghcr.io/${{ env.GHCR_REPOSITORY }}:${{ env.TAG }}-${{ matrix.arch }}
# ghcr.io/${{ env.GHCR_REPOSITORY }}:latest-${{ matrix.arch }}
labels
:
${{ steps.meta.outputs.labels }}
cache-from
:
type=gha
cache-to
:
type=gha,mode=max
provenance
:
mode=max
sbom
:
true
-
name
:
Install cosign
uses
:
sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac
# v3
-
name
:
Sign image with cosign
run
:
cosign sign --yes calciumion/new-api@${{ steps.build.outputs.digest }}
-
name
:
Output digest
run
:
|
echo "### Docker Image Digest (${{ matrix.arch }})" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "calciumion/new-api:${{ env.TAG }}-${{ matrix.arch }}" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.build.outputs.digest }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
create_manifests
:
name
:
Create multi-arch manifests (Docker Hub)
needs
:
[
build_single_arch
]
runs-on
:
ubuntu-latest
if
:
startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
steps
:
-
name
:
Extract tag
run
:
|
if [ -n "${{ github.event.inputs.tag }}" ]; then
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
else
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
#
# - name: Normalize GHCR repository
# run: echo "GHCR_REPOSITORY=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
-
name
:
Log in to Docker Hub
uses
:
docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
# v3
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Create & push manifest (Docker Hub - version)
run
:
|
docker buildx imagetools create \
-t calciumion/new-api:${TAG} \
calciumion/new-api:${TAG}-amd64 \
calciumion/new-api:${TAG}-arm64
-
name
:
Create & push manifest (Docker Hub - latest)
run
:
|
docker buildx imagetools create \
-t calciumion/new-api:latest \
calciumion/new-api:latest-amd64 \
calciumion/new-api:latest-arm64
-
name
:
Output manifest digest
run
:
|
echo "### Multi-arch Manifest" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
docker buildx imagetools inspect calciumion/new-api:${TAG} >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
# ---- GHCR ----
# - name: Log in to GHCR
# uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Create & push manifest (GHCR - version)
# run: |
# docker buildx imagetools create \
# -t ghcr.io/${GHCR_REPOSITORY}:${TAG} \
# ghcr.io/${GHCR_REPOSITORY}:${TAG}-amd64 \
# ghcr.io/${GHCR_REPOSITORY}:${TAG}-arm64
#
# - name: Create & push manifest (GHCR - latest)
# run: |
# docker buildx imagetools create \
# -t ghcr.io/${GHCR_REPOSITORY}:latest \
# ghcr.io/${GHCR_REPOSITORY}:latest-amd64 \
# ghcr.io/${GHCR_REPOSITORY}:latest-arm64
README.en.md
View file @
c609cb13
<div
align=
"center"
>
<div
align=
"center"
>


# New API
# New API
...
...
README.fr.md
View file @
c609cb13
<div
align=
"center"
>
<div
align=
"center"
>


# New API
# New API
...
...
README.ja.md
View file @
c609cb13
<div
align=
"center"
>
<div
align=
"center"
>


# New API
# New API
...
...
README.md
View file @
c609cb13
<div
align=
"center"
>
<div
align=
"center"
>


# New API
# New API
...
...
README.zh_CN.md
View file @
c609cb13
<div
align=
"center"
>
<div
align=
"center"
>


# New API
# New API
...
...
README.zh_TW.md
View file @
c609cb13
<div
align=
"center"
>
<div
align=
"center"
>


# New API
# New API
...
...
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