diff --git a/.github/workflows/plugins-benchmark-pr.yml b/.github/workflows/plugins-benchmark-pr.yml index 4bb5055..3afe914 100644 --- a/.github/workflows/plugins-benchmark-pr.yml +++ b/.github/workflows/plugins-benchmark-pr.yml @@ -7,7 +7,30 @@ on: type: string default: benchmark required: false - + source_repo: + type: string + default: ${{ github.event.pull_request.head.repo.full_name }} + required: false + source_sha: + type: string + default: ${{ github.event.pull_request.head.sha }} + required: false + source_ref: + type: string + default: ${{ github.event.pull_request.head.ref }} + required: false + target_repo: + type: string + default: ${{ github.event.pull_request.base.repo.full_name }} + required: false + target_sha: + type: string + default: ${{ github.event.pull_request.base.sha }} + required: false + target_ref: + type: string + default: ${{ github.event.pull_request.base.ref }} + required: false jobs: benchmark: if: ${{ github.event.label.name == 'benchmark' }} @@ -18,9 +41,9 @@ jobs: PR-BENCH-18: ${{ steps.benchmark-pr.outputs.BENCH_RESULT_18 }} PR-BENCH-20: ${{ steps.benchmark-pr.outputs.BENCH_RESULT_20 }} PR-BENCH-21: ${{ steps.benchmark-pr.outputs.BENCH_RESULT_21 }} - DEFAULT-BENCH-18: ${{ steps.benchmark-default.outputs.BENCH_RESULT_18 }} - DEFAULT-BENCH-20: ${{ steps.benchmark-default.outputs.BENCH_RESULT_20 }} - DEFAULT-BENCH-21: ${{ steps.benchmark-default.outputs.BENCH_RESULT_21 }} + TARGET-BENCH-18: ${{ steps.benchmark-default.outputs.BENCH_RESULT_18 }} + TARGET-BENCH-20: ${{ steps.benchmark-default.outputs.BENCH_RESULT_20 }} + TARGET-BENCH-21: ${{ steps.benchmark-default.outputs.BENCH_RESULT_21 }} strategy: matrix: @@ -29,8 +52,8 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - ref: ${{github.event.pull_request.head.sha}} - repository: ${{github.event.pull_request.head.repo.full_name}} + ref: ${{ inputs.source_sha }} + repository: ${{ inputs.source_repo }} - uses: actions/setup-node@v4 with: @@ -50,8 +73,8 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - ref: refs/heads/${{github.event.pull_request.base.repo.default_branch}} - repository: ${{github.event.pull_request.base.repo.full_name}} + ref: ${{ inputs.target_sha }} + repository: ${{ inputs.target_repo }} - name: Install run: | @@ -77,35 +100,35 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: | **Node**: 18 - **${{github.event.pull_request.head.ref}}**: + ${{ inputs.source_repo }}@${{ inputs.source_sha }} (${{ inputs.source_ref }}): ``` ${{ needs.benchmark.outputs.PR-BENCH-18 }} ``` - **${{ github.event.repository.default_branch }}**: + ${{ inputs.target_repo }}/${{ inputs.target_sha }} (${{ inputs.target_ref }}): ``` - ${{ needs.benchmark.outputs.DEFAULT-BENCH-18 }} + ${{ needs.benchmark.outputs.TARGET-BENCH-18 }} ``` --- **Node**: 20 - **${{github.event.pull_request.head.ref}}**: + ${{ inputs.source_repo }}@${{ inputs.source_sha }} (${{ inputs.source_ref }}): ``` ${{ needs.benchmark.outputs.PR-BENCH-20 }} ``` - **${{ github.event.repository.default_branch }}**: + ${{ inputs.target_repo }}/${{ inputs.target_sha }} (${{ inputs.target_ref }}): ``` - ${{ needs.benchmark.outputs.DEFAULT-BENCH-20 }} + ${{ needs.benchmark.outputs.TARGET-BENCH-20 }} ``` --- **Node**: 21 - **${{github.event.pull_request.head.ref}}**: + ${{ inputs.source_repo }}@${{ inputs.source_sha }} (${{ inputs.source_ref }}): ``` ${{ needs.benchmark.outputs.PR-BENCH-21 }} ``` - **${{ github.event.repository.default_branch }}**: + ${{ inputs.target_repo }}/${{ inputs.target_sha }} (${{ inputs.target_ref }}): ``` - ${{ needs.benchmark.outputs.DEFAULT-BENCH-21 }} + ${{ needs.benchmark.outputs.TARGET-BENCH-21 }} ```