fix: 修复 CI/CD 配置
- 移除 docker.yml (不需要 Docker 构建) - 修复 nuget.yml 中 YAML 语法错误 (双引号改为单引号)
This commit is contained in:
parent
1b8c937aa4
commit
55a57408b3
@ -1,45 +0,0 @@
|
||||
name: Build and Push Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
env:
|
||||
REGISTRY: gitea.shtao1.cn
|
||||
IMAGE_NAME: fengling/fengling-platform
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: fengling
|
||||
password: ${{ secrets.GITEATOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=sha
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@ -22,15 +22,15 @@ jobs:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Pack Domain
|
||||
if: startsWith(github.ref, "refs/tags/v")
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: dotnet pack Fengling.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages
|
||||
|
||||
- name: Pack Infrastructure
|
||||
if: startsWith(github.ref, "refs/tags/v")
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: dotnet pack Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj -c Release -o ./packages
|
||||
|
||||
- name: Push to Gitea
|
||||
if: startsWith(github.ref, "refs/tags/v")
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
for pkg in ./packages/*.nupkg; do
|
||||
dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/fengling/go/__index" --skip-duplicate
|
||||
|
||||
Loading…
Reference in New Issue
Block a user