From 17fb94cb1b3ee92228e0edc67b4a50cc01ac71fd Mon Sep 17 00:00:00 2001 From: cte Date: Fri, 31 Jan 2025 21:50:06 -0800 Subject: [PATCH] Secrets can't be used in conditionals, apparently --- .github/workflows/code-qa.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-qa.yml b/.github/workflows/code-qa.yml index 6f23421..0ff0ff1 100644 --- a/.github/workflows/code-qa.yml +++ b/.github/workflows/code-qa.yml @@ -44,7 +44,10 @@ jobs: run: npm test integration-test: - if: "${{ secrets.OPENROUTER_API_KEY != '' }}" + # https://stackoverflow.com/questions/72925899/github-actions-detect-if-secret-exists + env: + OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} + if: ${{ env.OPENROUTER_API_KEY != '' }} strategy: matrix: os: [ubuntu-latest] # macos-latest, windows-latest @@ -59,8 +62,6 @@ jobs: cache: 'npm' - name: Create env.integration file run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.integration - - name: Check env.integration file - run: cat .env.integration - name: Install dependencies run: npm run install:all - run: xvfb-run -a npm run test:integration