Skip to content

Commit 7d0a355

Browse files
committed
Improve output.
1 parent 68dd870 commit 7d0a355

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/converter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616

17-
run:
17+
build_and_run:
1818
env:
1919
build_config: Release
2020
book_folder: ${{ github.event.repository.name }}${{ case(inputs.is_index, '/index', '') }}

.github/workflows/deploy.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,15 @@ jobs:
8787
- name: Set $build_job_id
8888
run: echo "build_job_id=$(gh run view $deploy_run_id -R originlab/${{ matrix.site }} | grep 'publish_book / convert' | grep -oP '\(ID \K\d+')" >> "$GITHUB_ENV"
8989
- name: Print converter output
90-
run: >
91-
gh run view $deploy_run_id -j $build_job_id -R originlab/${{ matrix.site }} --log
92-
| awk '/generator\.dll"/ {f=1} /upload-artifact/ {f=0} f'
90+
run: |
91+
gh run view $deploy_run_id -j $build_job_id -R originlab/${{ matrix.site }} --log \
92+
| awk '/generator\.dll"/ {f=1} /upload-artifact/ {f=0} f' \
9393
| cut -f3- | cut -d' ' -f2-
9494
- name: Print artifacts summary
95-
run: >
96-
gh api /repos/originlab/${{ matrix.site }}/actions/runs/$deploy_run_id/artifacts -q '.artifacts[] | {name:.name,mb:(.size_in_bytes/1024/1024 | round)}'
97-
>> "$GITHUB_STEP_SUMMARY"
95+
run: |
96+
echo '# Artifacts' >> "$GITHUB_STEP_SUMMARY"
97+
echo '| Name | Size (MB) |' >> "$GITHUB_STEP_SUMMARY"
98+
echo '| :--- | :---: |' >> "$GITHUB_STEP_SUMMARY"
99+
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"
98101

0 commit comments

Comments
 (0)