From 8c3850bd2d4c59b4c3239c6fafaaa1fa82b4e944 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 6 May 2026 09:49:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A0=E5=85=A5=20DOTNET=5FENVIRONME?= =?UTF-8?q?NT=20=E5=8F=83=E6=95=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot --- action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 850af2c..15b169b 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,9 @@ inputs: DOTNET_VERSION: description: '使用的 .NET 版本' default: '10.0' + DOTNET_ENVIRONMENT: + description: '使用的 .NET 環境名稱' + default: 'Production' PROJECT_NAME: description: '專案名稱(包含 Microsoft.EntityFrameworkCore.Design 的專案)' required: true @@ -16,8 +19,6 @@ inputs: required: true runs: using: 'composite' - env: - ASPNETCORE_ENVIRONMENT: "Production" steps: - name: 取得專案 uses: actions/checkout@v6 @@ -26,5 +27,8 @@ runs: with: dotnet-version: ${{ inputs.DOTNET_VERSION }} - name: 資料庫移轉 + env: + ASPNETCORE_ENVIRONMENT: ${{ inputs.DOTNET_ENVIRONMENT }} run: dotnet ef database update --project ../${{ inputs.MIGRATION_PROJECT_NAME }} --context ${{ inputs.MIGRATION_CONTEXT }} + shell: bash working-directory: ${{ inputs.PROJECT_NAME }} \ No newline at end of file