Skip to content

Commit 4aaaafc

Browse files
author
Itay Krämer
committed
Include package resolver context in build failure annotations
1 parent c67924a commit 4aaaafc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.github/workflows/php85.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
if: failure()
3030
run: |
3131
if [ -f /tmp/php85-build.log ]; then
32-
python3 -c 'import pathlib; s=pathlib.Path("/tmp/php85-build.log").read_text(); s="\n".join(l for l in s.splitlines() if any(w in l.lower() for w in ["error", "no such", "not found", "failed", "unable"]))[:5000]; print("::error::"+s.replace("%","%25").replace("\r","%0D").replace("\n","%0A"))'
32+
python3 -c 'import pathlib; s=pathlib.Path("/tmp/php85-build.log").read_text(); lines=s.splitlines(); selected={j for i,l in enumerate(lines) if "ERROR:" in l and len(l)<500 for j in range(max(0,i-2),min(len(lines),i+15))}; s="\n".join(lines[j] for j in sorted(selected))[:5000]; print("::error::"+s.replace("%","%25").replace("\r","%0D").replace("\n","%0A"))'
3333
fi

0 commit comments

Comments
 (0)