From 6053179f25a7dbf13e44446667c1a643fb24c79d Mon Sep 17 00:00:00 2001 From: Rajendra Reddy Date: Sun, 29 Mar 2026 17:01:41 +0000 Subject: [PATCH] Update .gitea/workflows/codeant.yml --- .gitea/workflows/codeant.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/codeant.yml b/.gitea/workflows/codeant.yml index e0afaa4..d1bf534 100644 --- a/.gitea/workflows/codeant.yml +++ b/.gitea/workflows/codeant.yml @@ -6,7 +6,7 @@ on: pull_request: branches: ["main"] schedule: - - cron: "0 0 * * *" # Daily Scan + - cron: "0 0 * * *" workflow_dispatch: jobs: @@ -27,15 +27,20 @@ jobs: - name: Install CodeAnt CLI run: npm install -g codeant-cli - - name: Authenticate CodeAnt - run: codeant set-token github ${{ secrets.CODEANT_API_TOKEN }} + # ✅ KEEP THIS (correct method) + - name: Configure CodeAnt Auth + env: + CODEANT_API_TOKEN: ${{ secrets.CODEANT_API_TOKEN }} + run: | + mkdir -p $HOME/.codeant + printf '{"apiKey":"%s"}\n' "$CODEANT_API_TOKEN" > $HOME/.codeant/config.json - name: Setup Git identity run: | git config --global user.email "ci@gitea.local" git config --global user.name "Gitea CI" - # 🔥 Full scan only on schedule (recommended) + # 🔥 Full scan only on schedule - name: Full repo AI scan (daily) if: github.event_name == 'schedule' run: | @@ -43,7 +48,6 @@ jobs: git checkout -b codeant-fullscan || git checkout codeant-fullscan - # Modify all files to force diff find . -type f \ -not -path "./.git/*" \ -exec sh -c 'echo "" >> "$1"' _ {} \; @@ -53,12 +57,11 @@ jobs: codeant review --committed > review.txt || true - # ⚡ Normal scan (PR / push) + # ⚡ Incremental scan - name: Incremental AI scan if: github.event_name != 'schedule' run: | echo "Running incremental scan..." - codeant review --committed > review.txt || true - name: Show results