diff --git a/.github/workflows/cd_prod.yml b/.github/workflows/cd_prod.yml index 0b5dc63..490eaa7 100644 --- a/.github/workflows/cd_prod.yml +++ b/.github/workflows/cd_prod.yml @@ -24,8 +24,12 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Set up GPT_PROMPT_SYSTEM environment variable decode - run: echo "GPT_PROMPT_SYSTEM=${{ secrets.GPT_PROMPT_SYSTEM }}" >> $GITHUB_ENV + - name: Decode GPT Prompt and Set Environment Variable + run: | + DECODED_PROMPT=$(echo "${{ secrets.GPT_PROMPT_SYSTEM }}" | base64 --decode) + echo "GPT_PROMPT_SYSTEM<> $GITHUB_ENV + echo "$DECODED_PROMPT" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV - name: Set yaml file uses: microsoft/variable-substitution@v1 @@ -42,7 +46,7 @@ jobs: logging.level.com.twentythree.peech: off logging.config: classpath:spring-logback.xml gpt.api.key: ${{secrets.GPT_API_KEY_PROD}} - gpt.prompt.system: ${{env.GPT_PROMPT_SYSTEM}} + gpt.prompt.system: DECODED_PROMPT=$(echo "${{ secrets.GPT_PROMPT_SYSTEM }}" | base64 --decode) jwt.secret.key: ${{secrets.JWT_SECRET_KEY_PROD}} jwt.access.key: ${{secrets.JWT_ACCESS_KEY}} jwt.refresh.key: ${{secrets.JWT_REFRESH_KEY}} diff --git a/.github/workflows/ci_prod.yml b/.github/workflows/ci_prod.yml index e2d8e14..aa87345 100644 --- a/.github/workflows/ci_prod.yml +++ b/.github/workflows/ci_prod.yml @@ -24,8 +24,12 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Set up GPT_PROMPT_SYSTEM environment variable decode - run: echo "GPT_PROMPT_SYSTEM=${{ secrets.GPT_PROMPT_SYSTEM }}" >> $GITHUB_ENV + - name: Decode GPT Prompt and Set Environment Variable + run: | + DECODED_PROMPT=$(echo "${{ secrets.GPT_PROMPT_SYSTEM }}" | base64 --decode) + echo "GPT_PROMPT_SYSTEM<> $GITHUB_ENV + echo "$DECODED_PROMPT" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV - name: Set yaml file uses: microsoft/variable-substitution@v1 diff --git a/.github/workflows/cicd_dev.yml b/.github/workflows/cicd_dev.yml index 764467f..db10f67 100644 --- a/.github/workflows/cicd_dev.yml +++ b/.github/workflows/cicd_dev.yml @@ -25,8 +25,12 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Set up GPT_PROMPT_SYSTEM environment variable decode - run: echo "GPT_PROMPT_SYSTEM=${{ secrets.GPT_PROMPT_SYSTEM }}" >> $GITHUB_ENV + - name: Decode GPT Prompt and Set Environment Variable + run: | + DECODED_PROMPT=$(echo "${{ secrets.GPT_PROMPT_SYSTEM }}" | base64 --decode) + echo "GPT_PROMPT_SYSTEM<> $GITHUB_ENV + echo "$DECODED_PROMPT" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV - name: Set yaml file uses: microsoft/variable-substitution@v1