Skip to content

Commit e54cfde

Browse files
committed
fix: use GITHUB_WORKSPACE for report paths in PR workflow
1 parent e04e2ca commit e54cfde

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585
- name: cppcheck
8686
run: |
87-
REPORT_DIR="$HOME/static-analysis/${{ github.repository }}/${{ github.run_id }}"
87+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
8888
mkdir -p "$REPORT_DIR"
8989
cppcheck \
9090
--enable=warning,style,performance,portability \
@@ -95,21 +95,21 @@ jobs:
9595
9696
- name: flawfinder
9797
run: |
98-
REPORT_DIR="$HOME/static-analysis/${{ github.repository }}/${{ github.run_id }}"
98+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
9999
mkdir -p "$REPORT_DIR"
100100
flawfinder --minlevel=3 --dataonly src include 2>&1 | tee "$REPORT_DIR/flawfinder-report.txt" || true
101101
echo "flawfinder scan complete. Report saved to $REPORT_DIR/flawfinder-report.txt"
102102
103103
- name: shellcheck scripts
104104
run: |
105-
REPORT_DIR="$HOME/static-analysis/${{ github.repository }}/${{ github.run_id }}"
105+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
106106
mkdir -p "$REPORT_DIR"
107107
shellcheck scripts/build.sh scripts/run.sh 2>&1 | tee "$REPORT_DIR/shellcheck-report.txt" || true
108108
echo "shellcheck scan complete. Report saved to $REPORT_DIR/shellcheck-report.txt"
109109
110110
- name: codespell
111111
run: |
112-
REPORT_DIR="$HOME/static-analysis/${{ github.repository }}/${{ github.run_id }}"
112+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
113113
mkdir -p "$REPORT_DIR"
114114
codespell \
115115
--skip="./.git,./build" \
@@ -122,5 +122,5 @@ jobs:
122122
if: always()
123123
with:
124124
name: static-analysis-reports-${{ github.run_id }}
125-
path: ${{ env.HOME }}/static-analysis/${{ github.repository }}/${{ github.run_id }}/
125+
path: ${{ github.workspace }}/reports/
126126
retention-days: 30

0 commit comments

Comments
 (0)