1111 # It's convenient to set variables for values used multiple times in the workflow
1212 SKETCHES_REPORTS_PATH : artifacts/libraries-report
1313 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
14- PR_NUMBER : ${{ github.event.workflow_run.pull_requests[0].number }}
1514
1615jobs :
1716 lib-test-results :
@@ -26,21 +25,32 @@ jobs:
2625 run : |
2726 mkdir -p artifacts && cd artifacts
2827 mkdir -p libraries-report
28+ mkdir -p workflows
2929 artifacts_url=${{ github.event.workflow_run.artifacts_url }}
3030 gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
3131 do
3232 IFS=$'\t' read name url <<< "$artifact"
3333 gh api $url > "$name.zip"
3434 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
3640 rm -r "temp_$name"
3741 done
3842 echo "Contents of parent directory:"
3943 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
4050
4151 - name : Report results
4252 uses : P-R-O-C-H-Y/report-size-deltas@libs
4353 with :
4454 sketches-reports-source : ${{ env.SKETCHES_REPORTS_PATH }}
4555 github-token : ${{ env.GITHUB_TOKEN }}
46- pr-number : ${{ env.PR_NUMBER }}
56+ pr-number : " ${{ steps.pr_num_reader.outputs.content }}"
0 commit comments