File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77jobs :
88 count-lines :
99 runs-on : ubuntu-latest
10+ env :
11+ TARGET_FILE : utils/matrix-logic/generate_sweep_configs.py
1012
1113 steps :
1214 - name : Checkout code
1517 - name : Count lines in generate_sweep_configs.py
1618 id : line-count
1719 run : |
18- FILE_PATH="utils/matrix-logic/generate_sweep_configs.py"
19-
20- if [ -f "$FILE_PATH" ]; then
21- LINE_COUNT=$(wc -l < "$FILE_PATH")
20+ if [ -f "$TARGET_FILE" ]; then
21+ LINE_COUNT=$(wc -l "$TARGET_FILE" | awk '{print $1}')
2222 echo "line_count=$LINE_COUNT" >> $GITHUB_OUTPUT
2323 echo "file_exists=true" >> $GITHUB_OUTPUT
2424 else
@@ -33,12 +33,10 @@ jobs:
3333
3434 FILE_EXISTS="${{ steps.line-count.outputs.file_exists }}"
3535 if [ "$FILE_EXISTS" == "true" ]; then
36- FILE_PATH="utils/matrix-logic/generate_sweep_configs.py"
3736 LINE_COUNT="${{ steps.line-count.outputs.line_count }}"
38- echo "**File:** \`$FILE_PATH \`" >> $GITHUB_STEP_SUMMARY
37+ echo "**File:** \`$TARGET_FILE \`" >> $GITHUB_STEP_SUMMARY
3938 echo "" >> $GITHUB_STEP_SUMMARY
4039 echo "**Total Lines:** $LINE_COUNT" >> $GITHUB_STEP_SUMMARY
4140 else
42- FILE_PATH="utils/matrix-logic/generate_sweep_configs.py"
43- echo "⚠️ **File not found:** \`$FILE_PATH\`" >> $GITHUB_STEP_SUMMARY
41+ echo "⚠️ **File not found:** \`$TARGET_FILE\`" >> $GITHUB_STEP_SUMMARY
4442 fi
You can’t perform that action at this time.
0 commit comments