Skip to content

Commit 4a4812f

Browse files
committed
chore: add summary to Action
1 parent 5f22145 commit 4a4812f

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434

3535
jobs:
3636
lint:
37-
name: Linters (mypy, flake8, etc.)
37+
name: Linters (mypy, ruff, etc.)
3838
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v4

action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,24 @@ runs:
8989
${{ inputs.only != '' && format('--only "{0}"', inputs.only) || ''}}
9090
shell: pwsh
9191
if: runner.os == 'Windows'
92+
93+
- run: |
94+
# Prepare summary
95+
"${{ steps.python.outputs.python-path }}" -u << "EOF"
96+
import os
97+
from pathlib import Path
98+
99+
output_dir = Path("${{ inputs.output-dir }}" or "wheelhouse")
100+
101+
with Path(os.environ["GITHUB_STEP_SUMMARY"]).open("w", encoding="utf-8") as f:
102+
print("## 🎡: files in output directory", file=f)
103+
print(file=f)
104+
for item in sorted(output_dir.iterdir()):
105+
if item.is_file():
106+
size_mb = item.stat().st_size / 1024**2
107+
print(f"* `{item}` - {size_mb:.2f} MB", file=f)
108+
else:
109+
print(f"* `{item.name}/`", file=f)
110+
print(file=f)
111+
EOF
112+
shell: bash

0 commit comments

Comments
 (0)