1818    container :
1919      image : ghcr.io/texasinstruments/processor-sdk-doc:latest 
2020      options : --entrypoint /bin/bash 
21-     permissions :
22-       contents : read 
23-       issues : write 
24-       pull-requests : write 
2521
2622    steps :
2723      - name : Checkout repository 
@@ -35,37 +31,34 @@ jobs:
3531          git switch master 
3632
3733name : Run rstcheck 
38-         id : rstcheck 
3934        run : | 
40-           bin/delta.sh -a master -b pr \ 
41-             -- rstcheck -r source/ 
42-           if [ "$(wc -l < _new-warn.log)" -gt "0" ]; then 
43-             { 
44-               echo "New warnings found with rstcheck:"; 
45-               echo '```text'; 
46-               cat _new-warn.log; 
47-               echo '```'; 
48-             } >> "$GITHUB_STEP_SUMMARY" 
49-             { 
50-               echo 'NEW_WARNINGS<<EOF' 
51-               echo "$(< "$GITHUB_STEP_SUMMARY")" 
52-               echo 'EOF' 
53-             } >> "$GITHUB_OUTPUT" 
54-             exit 1 
55-           fi 
56-           echo "No new warnings found with rstcheck" >> "$GITHUB_STEP_SUMMARY" 
35+           # Run the test 
36+           bin/delta.sh -a master -b pr -- rstcheck -r source/ 
5737
58- name : Update pr with info 
59-         uses : actions/github-script@v7 
60-         if : ${{ failure() && steps.rstcheck.outputs.NEW_WARNINGS != '' }} 
61-         env :
62-           NEW_WARNINGS : ${{ steps.rstcheck.outputs.NEW_WARNINGS }} 
38+           # Prepare summary 
39+           WARNING_COUNT=$(wc -l < _new-warn.log) 
40+           if [ "$WARNING_COUNT" -gt "0" ]; then 
41+             echo "New warnings found with rstcheck:" 
42+             echo '```text' 
43+             cat _new-warn.log 
44+             echo '```' 
45+           else 
46+             echo "No new warnings found with rstcheck" 
47+           fi >> "$GITHUB_STEP_SUMMARY" 
48+ 
49+           # Prepare the artifacts 
50+           mkdir -p ./results 
51+           echo "${{ github.event.number }}" > ./results/id 
52+           cp "$GITHUB_STEP_SUMMARY" ./results/summary 
53+           echo "$(wc -l < _new-warn.log)" > ./results/problem-count 
54+ 
55+           # Exit with error if there are new warnings 
56+           [ "$WARNING_COUNT" -gt "0" ] && exit 1 
57+ 
58+ name : Save results 
59+         uses : actions/upload-artifact@v4 
60+         if : always() 
6361        with :
64-           github-token : ${{ secrets.GITHUB_TOKEN }} 
65-           script : | 
66-             github.rest.issues.createComment({ 
67-               owner: context.repo.owner, 
68-               issue_number: context.issue.number, 
69-               repo: context.repo.repo, 
70-               body: process.env.NEW_WARNINGS 
71-             }) 
62+           name : results 
63+           path : results/ 
64+           retention-days : 1 
0 commit comments