diff --git a/action.yml b/action.yml index 4212803..81e94dd 100644 --- a/action.yml +++ b/action.yml @@ -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: