feat: 加入 DOTNET_ENVIRONMENT 參數
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
+6
-2
@@ -5,6 +5,9 @@ inputs:
|
|||||||
DOTNET_VERSION:
|
DOTNET_VERSION:
|
||||||
description: '使用的 .NET 版本'
|
description: '使用的 .NET 版本'
|
||||||
default: '10.0'
|
default: '10.0'
|
||||||
|
DOTNET_ENVIRONMENT:
|
||||||
|
description: '使用的 .NET 環境名稱'
|
||||||
|
default: 'Production'
|
||||||
PROJECT_NAME:
|
PROJECT_NAME:
|
||||||
description: '專案名稱(包含 Microsoft.EntityFrameworkCore.Design 的專案)'
|
description: '專案名稱(包含 Microsoft.EntityFrameworkCore.Design 的專案)'
|
||||||
required: true
|
required: true
|
||||||
@@ -16,8 +19,6 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
env:
|
|
||||||
ASPNETCORE_ENVIRONMENT: "Production"
|
|
||||||
steps:
|
steps:
|
||||||
- name: 取得專案
|
- name: 取得專案
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -26,5 +27,8 @@ runs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: ${{ inputs.DOTNET_VERSION }}
|
dotnet-version: ${{ inputs.DOTNET_VERSION }}
|
||||||
- name: 資料庫移轉
|
- name: 資料庫移轉
|
||||||
|
env:
|
||||||
|
ASPNETCORE_ENVIRONMENT: ${{ inputs.DOTNET_ENVIRONMENT }}
|
||||||
run: dotnet ef database update --project ../${{ inputs.MIGRATION_PROJECT_NAME }} --context ${{ inputs.MIGRATION_CONTEXT }}
|
run: dotnet ef database update --project ../${{ inputs.MIGRATION_PROJECT_NAME }} --context ${{ inputs.MIGRATION_CONTEXT }}
|
||||||
|
shell: bash
|
||||||
working-directory: ${{ inputs.PROJECT_NAME }}
|
working-directory: ${{ inputs.PROJECT_NAME }}
|
||||||
Reference in New Issue
Block a user