Skip to content

Commit

Permalink
Skip pull_request actions when fetching ref in gas-compare action
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Jul 9, 2022
1 parent cfc9f84 commit 3a1c020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/gas-compare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
required: false
default: gasReporterOutput.json
out_report:
description: report to read
description: report to read
required: false
default: ${{ github.ref_name }}.gasreport.json
ref_report:
Expand All @@ -22,7 +22,7 @@ runs:
- name: Download reference report
if: github.event_name == 'pull_request'
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
env:
GITHUB_TOKEN: ${{ inputs.token }}
Expand Down

0 comments on commit 3a1c020

Please sign in to comment.