Skip to content

Commit

Permalink
ci: run on pull requests only
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Sep 25, 2024
1 parent 832f973 commit 0a01d60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ jobs:
gas-diff:
runs-on: ubuntu-latest
name: Foundry Gas Diff
if: ${{ needs.changes.outputs.package_count > 0 }}
# This action needs to be triggered on Pull Requests only, assuming there are changes to the package in question.
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && needs.changes.outputs.package_count > 0 }}
needs: changes
strategy:
fail-fast: false
Expand Down Expand Up @@ -288,7 +289,7 @@ jobs:
id: gas_diff

- name: Add gas diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
# delete the comment in case changes no longer impact gas costs
Expand Down

0 comments on commit 0a01d60

Please sign in to comment.