@@ -12,45 +12,49 @@ jobs:
1212 uses : tj-actions/changed-files@v44
1313 with :
1414 separator : ' '
15+
1516 - name : Checkout the ${{github.base_ref}} branch
1617 uses : actions/checkout@v4
1718 with :
18- # # checkout the base branch (usually master/main).
19- ref : ${{github.base_ref}}
19+ ref : ${{github.base_ref}} # checkout the base branch (usually master/main).
20+
2021 - name : Use Node.js 20.x
2122 uses : actions/setup-node@v4
2223 with :
2324 node-version : 20.x
25+
2426 - name : Run Coana on the ${{github.base_ref}} branch
2527 run : |
2628 npx @coana-tech/cli run . \
27- --api-key ${{ secrets.COANA_API_KEY }} \
29+ --guardrail-mode \
30+ --api-key ${{ secrets.COANA_API_KEY || 'api-key-unavailable' }} \
2831 -o /tmp/main-branch \
29- --changed-files \
30- ${{ steps.changed-files.outputs.all_changed_files }} \
32+ --changed-files ${{ steps.changed-files.outputs.all_changed_files }} \
3133 --lightweight-reachability \
32- --disable-report-submission \
33- --repo-url https://github.com/${{github.repository}}
34+
35+ # Reset file permissions changed by Coana CLI.
36+ - name : Reset file permissions
37+ run : sudo chown -R $USER:$USER .
38+
3439 - name : Checkout the current branch
3540 uses : actions/checkout@v4
3641 with :
37- clean : false
42+ clean : true
43+
3844 - name : Run Coana on the current branch
3945 run : |
4046 npx @coana-tech/cli run . \
41- --api-key ${{ secrets.COANA_API_KEY }} \
47+ --guardrail-mode \
48+ --api-key ${{ secrets.COANA_API_KEY || 'api-key-unavailable' }} \
4249 -o /tmp/current-branch \
43- --changed-files \
44- ${{ steps.changed-files.outputs.all_changed_files }} \
50+ --changed-files ${{ steps.changed-files.outputs.all_changed_files }} \
4551 --lightweight-reachability \
46- --disable-report-submission \
47- --repo-url https://github.com/${{github.repository}}
52+
4853 - name : Run Report Comparison
4954 run : |
5055 npx @coana-tech/cli compare-reports \
51- --api-key ${{ secrets.COANA_API_KEY }} \
52- --no-block \
56+ --api-key ${{ secrets.COANA_API_KEY || 'api-key-unavailable' }} \
5357 /tmp/main-branch/coana-report.json \
5458 /tmp/current-branch/coana-report.json
5559 env :
56- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments