Skip pull_request actions when fetching ref in gas-compare action

This commit is contained in:
Hadrien Croubois
2022-07-09 09:49:16 +02:00
parent cfc9f840a0
commit 3a1c020b7d

View File

@ -22,7 +22,7 @@ runs:
- name: Download reference report - name: Download reference report
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
run: | run: |
RUN_ID=`gh run list --repo ${{ github.repository }} --branch ${{ github.base_ref }} --workflow ${{ github.workflow }} --json 'conclusion,databaseId' --jq 'map(select(.conclusion=="success"))[0].databaseId'` RUN_ID=`gh run list --repo ${{ github.repository }} --branch ${{ github.base_ref }} --workflow ${{ github.workflow }} --limit 100 --json 'conclusion,databaseId,event' --jq 'map(select(.conclusion=="success" and .event!="pull_request"))[0].databaseId'`
gh run download ${RUN_ID} --repo ${{ github.repository }} -n gasreport gh run download ${RUN_ID} --repo ${{ github.repository }} -n gasreport
env: env:
GITHUB_TOKEN: ${{ inputs.token }} GITHUB_TOKEN: ${{ inputs.token }}