File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ concurrency:
2222jobs :
2323 scan :
2424 runs-on : ubuntu-latest
25+ env :
26+ HAS_APP_SECRETS : ${{ secrets.CAGENT_REVIEWER_APP_ID != '' }}
2527
2628 steps :
2729 - name : Checkout repository
@@ -40,16 +42,26 @@ jobs:
4042 restore-keys : |
4143 scanner-memory-${{ github.repository }}-
4244
45+ - name : Generate GitHub App token
46+ if : env.HAS_APP_SECRETS == 'true'
47+ id : app-token
48+ continue-on-error : true
49+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
50+ with :
51+ app_id : ${{ secrets.CAGENT_REVIEWER_APP_ID }}
52+ private_key : ${{ secrets.CAGENT_REVIEWER_APP_PRIVATE_KEY }}
53+
4354 - name : Run nightly scan
4455 uses : docker/cagent-action@latest
4556 env :
46- GH_TOKEN : ${{ github.token }}
57+ GH_TOKEN : ${{ steps.app-token.outputs.token || github.token }}
4758 with :
4859 agent : ${{ github.workspace }}/.github/agents/nightly-scanner.yaml
4960 prompt : ${{ inputs.dry-run && 'DRY RUN MODE: Do not create any issues. Just report what you would create.' || '' }}
5061 anthropic-api-key : ${{ secrets.ANTHROPIC_API_KEY }}
5162 openai-api-key : ${{ secrets.OPENAI_API_KEY }}
5263 google-api-key : ${{ secrets.GEMINI_API_KEY }}
64+ github-token : ${{ steps.app-token.outputs.token || github.token }}
5365 timeout : 1200
5466
5567 - name : Save scanner memory
You can’t perform that action at this time.
0 commit comments