Compare commits
1 commit
4b8ce403a3
...
78313cff98
Author | SHA1 | Date | |
---|---|---|---|
78313cff98 |
1 changed files with 5 additions and 7 deletions
12
action.yml
12
action.yml
|
@ -39,8 +39,6 @@ inputs:
|
||||||
artifact-name:
|
artifact-name:
|
||||||
description: The name of the generated artifact.
|
description: The name of the generated artifact.
|
||||||
default: report.json
|
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)
|
# Comparison Report (comment only)
|
||||||
do-comparison:
|
do-comparison:
|
||||||
description: |
|
description: |
|
||||||
|
@ -115,7 +113,7 @@ runs:
|
||||||
- name: Find previous run on base-branch
|
- name: Find previous run on base-branch
|
||||||
# Only run when doing comparisons
|
# Only run when doing comparisons
|
||||||
if: inputs.do-comparison == 'true'
|
if: inputs.do-comparison == 'true'
|
||||||
id: previous-report
|
id: previous_report
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
BASE_BRANCH: ${{ inputs.base-branch }}
|
BASE_BRANCH: ${{ inputs.base-branch }}
|
||||||
|
@ -141,15 +139,15 @@ runs:
|
||||||
--arg head_branch "${BASE_BRANCH:-$(default_branch)}" \
|
--arg head_branch "${BASE_BRANCH:-$(default_branch)}" \
|
||||||
'[.workflow_runs[] | select(.name == $name and .head_branch == $head_branch)] | first | .id')
|
'[.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
|
- name: Download previous report
|
||||||
uses: https://git.salame.cl/actions/download-artifact@d8d0a99033603453ad2255e58720b460a0555e1e # v4
|
uses: https://git.salame.cl/actions/download-artifact@v4
|
||||||
# Ensure the previous step succeeded
|
# Ensure the previous step succeeded
|
||||||
if: inputs.do-comparison == 'true' && steps.previous_report.outcome == 'success'
|
if: inputs.do-comparison == 'true' && steps.previous_report.outcome == 'success'
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact-name }}
|
name: ${{ inputs.artifact-name }}
|
||||||
github-token: ${{ inputs.github-token }}
|
github-token: ${{ github.token }}
|
||||||
run-id: ${{ steps.previous-report.run-id }}
|
run-id: ${{ steps.previous_report.run_id }}
|
||||||
- name: Create report
|
- name: Create report
|
||||||
if: inputs.comment-on-pr == 'true' || inputs.generate-artifact == 'true'
|
if: inputs.comment-on-pr == 'true' || inputs.generate-artifact == 'true'
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue