Skip to content

Commit bd6b8c0

Browse files
committed
build: correct file detection in markdown equations workflow
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 886ac7f commit bd6b8c0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/markdown_equations.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,18 @@ jobs:
109109
# Generate list of changed Markdown files:
110110
- name: 'Find changed Markdown files'
111111
run: |
112-
echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -G '<equation' | grep .md | tr '\n' ' ')" >> $GITHUB_OUTPUT
112+
# Get Markdown files changed in the last 25 hours (to account for cron timing variance)
113+
CHANGED_FILES=$(git log --since='25 hours ago' --name-only --diff-filter=AM --pretty=format: -- '*.md' | sort -u)
114+
115+
# Filter to only files that contain '<equation' tags
116+
FILES=""
117+
for file in $CHANGED_FILES; do
118+
if [ -f "$file" ] && grep -q '<equation' "$file"; then
119+
FILES="$FILES $file"
120+
fi
121+
done
122+
123+
echo "files=$FILES" >> $GITHUB_OUTPUT
113124
id: changed
114125

115126
# Generate SVG equations:

0 commit comments

Comments
 (0)