diff --git a/.github/workflows/self-index.yml b/.github/workflows/self-index.yml index 5fa3bcc..5c51dad 100644 --- a/.github/workflows/self-index.yml +++ b/.github/workflows/self-index.yml @@ -14,13 +14,26 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository_owner != '' }} steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: actions/checkout@v5 + - uses: astral-sh/setup-uv@v6 with: enable-cache: true - run: uv sync --extra dev + - name: Check for GROQ_API_KEY + id: key + env: + GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} + run: | + if [ -z "$GROQ_API_KEY" ]; then + echo "GROQ_API_KEY is not configured; skipping the smoke test." >> "$GITHUB_STEP_SUMMARY" + echo "present=false" >> "$GITHUB_OUTPUT" + else + echo "present=true" >> "$GITHUB_OUTPUT" + fi + - name: Index self and ask a smoke-test question + if: steps.key.outputs.present == 'true' env: GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} REPOLENS_DATA_DIR: ${{ runner.temp }}/repolens-data