From b3470e0eb9d31f5e565222ef18245e25f3697caa Mon Sep 17 00:00:00 2001 From: leehk Date: Wed, 16 Apr 2025 14:09:01 +0800 Subject: [PATCH] update --- .github/workflows/build_new.yml | 4 ++-- .github/workflows/template_test.yml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_new.yml b/.github/workflows/build_new.yml index 6af05e9..a4b002c 100644 --- a/.github/workflows/build_new.yml +++ b/.github/workflows/build_new.yml @@ -91,8 +91,8 @@ jobs: "env": { "ENVIRONMENT": "dev", "TESTING": "1", - "DEEPSEEK_API_KEY": "${{ secrets.DEEPSEEK_API_KEY }}", - "TAVILY_API_KEY": "${{ secrets.TAVILY_API_KEY }}" + "DEEPSEEK_API_KEY": "", + "TAVILY_API_KEY": "" } }, diff --git a/.github/workflows/template_test.yml b/.github/workflows/template_test.yml index e73cce9..cf6d146 100644 --- a/.github/workflows/template_test.yml +++ b/.github/workflows/template_test.yml @@ -35,6 +35,7 @@ on: required: false type: string default: results.xml + jobs: compose_and_test: @@ -64,8 +65,12 @@ jobs: run: | # Load Inputs (parse JSON strings) $imagesJson = '${{ inputs.images }}' + $deepseekApiKey = '${{ secrets.DEEPSEEK_API_KEY }}' + $tavilyApiKey = '${{ secrets.TAVILY_API_KEY }}' # Substitute secrets *before* parsing JSON using environment variables # Be very careful with escaping if secrets contain special JSON characters + $imagesJson = $imagesJson -replace '"DEEPSEEK_API_KEY": ""', "`"DEEPSEEK_API_KEY`": `"$deepseekApiKey`"" + $imagesJson = $imagesJson -replace '"TAVILY_API_KEY": ""', "`"TAVILY_API_KEY`": `"$tavilyApiKey`"" Write-Host "Substituted Images JSON: $imagesJson" # Debugging - remove sensitive info if public $images = $imagesJson | ConvertFrom-Json