feat: add Docker Hub

This commit is contained in:
hamster1963 2024-09-22 21:50:26 +08:00
parent 3796dc8687
commit abdd7f245f
2 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,12 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to AliYun Container Registry - name: Login to AliYun Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -25,6 +31,7 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: | images: |
hamster1963/nezha-dash
registry.cn-guangzhou.aliyuncs.com/hamster-home/nezha-dash registry.cn-guangzhou.aliyuncs.com/hamster-home/nezha-dash
tags: | tags: |
type=raw,value=latest type=raw,value=latest

View File

@ -9,6 +9,9 @@ export async function GET(_: Request) {
return NextResponse.json(response, { status: 200 }); return NextResponse.json(response, { status: 200 });
} catch (error) { } catch (error) {
console.error(error); console.error(error);
return NextResponse.json({ error: "fetch nezha data failed" }, { status: 400 }); return NextResponse.json(
{ error: "fetch nezha data failed" },
{ status: 400 },
);
} }
} }