Skip to content

Commit 474eb21

Browse files
committed
update bash
1 parent c191d8b commit 474eb21

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

.github/workflows/publishlib.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ jobs:
3030
do
3131
IFS=$'\t' read name url <<< "$artifact"
3232
gh api $url > "$name.zip"
33-
unzip -d "$name" "$name.zip"
33+
unzip -j "$name.zip" -d "temp_$name"
34+
mv "temp_$name"/* ${{ env.SKETCHES_REPORTS_PATH }}/
35+
rm -r "temp_$name"
3436
done
37+
echo "Contents of 'libraries-report':"
38+
ls -R libraries-report
39+
echo "Contents of parent directory:"
40+
ls -R ..
3541
3642
- name: Report results
3743
uses: P-R-O-C-H-Y/report-size-deltas@main

.github/workflows/publishsizes.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Sizes Results
2+
3+
on:
4+
workflow_run:
5+
workflows: [Sizes Test]
6+
types:
7+
- completed
8+
9+
workflow_dispatch:
10+
env:
11+
# It's convenient to set variables for values used multiple times in the workflow
12+
SKETCHES_REPORTS_PATH: artifacts/sizes-report
13+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
14+
PR_EVENT_PATH: artifacts/Event File/event.json
15+
16+
jobs:
17+
lib-test-results:
18+
name: Sizes Test Results
19+
runs-on: ubuntu-latest
20+
if: |
21+
github.event.workflow_run.event == 'pull_request' &&
22+
github.event.workflow_run.conclusion == 'success'
23+
24+
steps:
25+
- name: Download and Extract Artifacts
26+
run: |
27+
mkdir -p artifacts && cd artifacts
28+
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
29+
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
30+
do
31+
IFS=$'\t' read name url <<< "$artifact"
32+
gh api $url > "$name.zip"
33+
unzip -j "$name.zip" -d "temp_$name"
34+
mv "temp_$name"/* ${{ env.SKETCHES_REPORTS_PATH }}/
35+
rm -r "temp_$name"
36+
done
37+
38+
- name: Report results
39+
uses: P-R-O-C-H-Y/report-size-deltas@sizes
40+
with:
41+
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
42+
github-token: ${{ env.GITHUB_TOKEN }}
43+
pr-event-path: ${{ env.PR_EVENT_PATH }}

0 commit comments

Comments
 (0)