Skip to content

Commit 565bbd5

Browse files
committed
fix path in set_docs_to_build
1 parent 722a313 commit 565bbd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/ci_set_matrix.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,13 @@ def set_docs_to_build(build_all):
238238
doc_pattern = re.compile(
239239
r"^(?:.github/workflows/|docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$"
240240
)
241+
github_workspace = os.environ.get("GITHUB_WORKSPACE") or ""
242+
github_workspace = github_workspace and github_workspace + "/"
241243
for p in changed_files:
242244
if (
243245
p.endswith(".c")
244246
and not subprocess.run(
245-
f"git diff -U0 {os.environ.get('BASE_SHA')}...{os.environ.get('HEAD_SHA')} {p} | grep -o -m 1 '^[+-]\/\/|'",
247+
f"git diff -U0 $BASE_SHA...$HEAD_SHA {github_workspace + p} | grep -o -m 1 '^[+-]\/\/|'",
246248
capture_output=True,
247249
shell=True,
248250
).stdout

0 commit comments

Comments
 (0)