File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9494 - name : Print artifacts summary
9595 run : |
9696 echo '# Artifacts' >> "$GITHUB_STEP_SUMMARY"
97- echo '| Name | Size (MB) |' >> "$GITHUB_STEP_SUMMARY"
97+ echo '| Name | Size |' >> "$GITHUB_STEP_SUMMARY"
9898 echo '| :--- | :---: |' >> "$GITHUB_STEP_SUMMARY"
9999 gh api /repos/originlab/${{ matrix.site }}/actions/runs/$deploy_run_id/artifacts \
100- -q '[.artifacts[]] | sort_by(.size_in_bytes) | reverse | .[] | "| \(.name) | \((.size_in_bytes/1024/1024*10|round)/10) MB |"' >> "$GITHUB_STEP_SUMMARY"
100+ -q '[.artifacts[]] | sort_by(.size_in_bytes) | reverse | .[] |
101+ if .size_in_bytes < 1048576 then
102+ "| \(.name) | \((.size_in_bytes/1024*10|round)/10) KB |"
103+ else
104+ "| \(.name) | \((.size_in_bytes/1024/1024*10|round)/10) MB |"
105+ end' >> "$GITHUB_STEP_SUMMARY"
101106
You can’t perform that action at this time.
0 commit comments