Skip to content

Commit

Permalink
ci: make list-packages outputs smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Jan 30, 2025
1 parent a033550 commit 5b42879
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/v-next-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.filter.outputs.changes }}
files: ${{ toJSON(steps.filter.outputs) }}
should_bundle: ${{ contains(steps.filter.outputs.hardhat_files, '.github/workflows/v-next-ci.yml') || contains(steps.filter.outputs.hardhat_files, 'pnpm-lock.yaml') }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -96,15 +96,14 @@ jobs:
with:
list-files: json
filters: ${{ steps.generate.outputs.filters }}
base: v-next # TODO: Remove once v-next becomes the default branch

bundle:
# Depending on list-packages only to check whether pnpm-lock.yaml has changed
# This could be handled by a simpler job, but an extra runner would have to be allocated for it
needs: list-packages

if: |
contains(fromJSON(needs.list-packages.outputs.files).hardhat_files, '.github/workflows/v-next-ci.yml') ||
contains(fromJSON(needs.list-packages.outputs.files).hardhat_files, 'pnpm-lock.yaml')
if: needs.list-packages.outputs.should_bundle == 'true'

# Using a matrix strategy even though there's only one package
# because we will want to add, at least, hardhat-toolbox in the future
Expand Down

0 comments on commit 5b42879

Please sign in to comment.