Compare commits

..

1 commit

Author SHA1 Message Date
4b8ce403a3
feat: use download-artifact instead of manually downloading it
All checks were successful
/ check (treefmt) (push) Successful in 3s
/ check-renovaterc (push) Successful in 2s
/ report-size (push) Successful in 5s
This should hopefully work on private repos too!
2025-05-13 20:31:20 +02:00

View file

@ -39,6 +39,8 @@ inputs:
artifact-name:
description: The name of the generated artifact.
default: report.json
github-token:
description: A github token with read permissions for this repository, required if do-comparison is 'true'
# Comparison Report (comment only)
do-comparison:
description: |
@ -113,7 +115,7 @@ runs:
- name: Find previous run on base-branch
# Only run when doing comparisons
if: inputs.do-comparison == 'true'
id: previous_report
id: previous-report
continue-on-error: true
env:
BASE_BRANCH: ${{ inputs.base-branch }}
@ -139,15 +141,15 @@ runs:
--arg head_branch "${BASE_BRANCH:-$(default_branch)}" \
'[.workflow_runs[] | select(.name == $name and .head_branch == $head_branch)] | first | .id')
echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
echo "run-id=$run_id" >> "$GITHUB_OUTPUT"
- name: Download previous report
uses: https://git.salame.cl/actions/download-artifact@v4
uses: https://git.salame.cl/actions/download-artifact@d8d0a99033603453ad2255e58720b460a0555e1e # v4
# Ensure the previous step succeeded
if: inputs.do-comparison == 'true' && steps.previous_report.outcome == 'success'
with:
name: ${{ inputs.artifact-name }}
github-token: ${{ github.token }}
run-id: ${{ steps.previous_report.run_id }}
github-token: ${{ inputs.github-token }}
run-id: ${{ steps.previous-report.run-id }}
- name: Create report
if: inputs.comment-on-pr == 'true' || inputs.generate-artifact == 'true'
env: