11
11
# It's convenient to set variables for values used multiple times in the workflow
12
12
SKETCHES_REPORTS_PATH : artifacts/libraries-report
13
13
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
14
- PR_NUMBER : ${{ github.event.workflow_run.pull_requests[0].number }}
15
14
16
15
jobs :
17
16
lib-test-results :
@@ -26,21 +25,32 @@ jobs:
26
25
run : |
27
26
mkdir -p artifacts && cd artifacts
28
27
mkdir -p libraries-report
28
+ mkdir -p workflows
29
29
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
30
30
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
31
31
do
32
32
IFS=$'\t' read name url <<< "$artifact"
33
33
gh api $url > "$name.zip"
34
34
unzip -j "$name.zip" -d "temp_$name"
35
- mv "temp_$name"/* libraries-report
35
+ if [[ "$name" == "pr_num" ]]; then
36
+ mv "temp_$name"/* workflows
37
+ else
38
+ mv "temp_$name"/* libraries-report
39
+ fi
36
40
rm -r "temp_$name"
37
41
done
38
42
echo "Contents of parent directory:"
39
43
ls -R ..
44
+
45
+ - name : Read the pr_num file
46
+ id : pr_num_reader
47
+ uses : juliangruber/read-file-action@v1
48
+ with :
49
+ path : ./artifacts/workflows/pr_num.txt
40
50
41
51
- name : Report results
42
52
uses : P-R-O-C-H-Y/report-size-deltas@libs
43
53
with :
44
54
sketches-reports-source : ${{ env.SKETCHES_REPORTS_PATH }}
45
55
github-token : ${{ env.GITHUB_TOKEN }}
46
- pr-number : ${{ env.PR_NUMBER }}
56
+ pr-number : " ${{ steps.pr_num_reader.outputs.content }}"
0 commit comments