mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-25 17:43:11 +00:00
ci(fix): fix workflow file conflicts
This commit is contained in:
parent
72526ba20d
commit
a76576af23
30
.github/workflows/Build_Image.yml
vendored
30
.github/workflows/Build_Image.yml
vendored
@ -2,11 +2,8 @@ name: Publish Docker image
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main, master]
|
||||||
- main
|
tags: ["v*"]
|
||||||
- master
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -14,32 +11,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 1️⃣ 检出代码
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# 2️⃣ 设置 Node 环境(可选:若需打包前构建)
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
|
|
||||||
# 3️⃣ 安装依赖与构建(如果你的 app 直接运行 app.js,可略)
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build (optional)
|
|
||||||
run: |
|
|
||||||
echo "Build step skipped — app.js already entry point."
|
|
||||||
|
|
||||||
# 4️⃣ 登录 Docker Hub
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
# 5️⃣ 构建并推送镜像
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
@ -48,8 +28,4 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
moefurina/ncm-api:latest
|
moefurina/ncm-api:latest
|
||||||
moefurina/ncm-api:${{ github.sha }}
|
moefurina/ncm-api:${{ github.sha }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64
|
||||||
|
|
||||||
# 6️⃣ (可选)输出镜像摘要
|
|
||||||
- name: Image digest
|
|
||||||
run: echo "Pushed image digest ${{ steps.docker_build.outputs.digest }}"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user