Skip to content

Commit

Permalink
add more matching files rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola committed Feb 6, 2025
1 parent 04ce27d commit 3b04bea
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/zombienet-reusable-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,28 @@ on:
outputs:
changes_substrate:
value: ${{ jobs.preflight.outputs.changes_substrate }}
description: |
True iff there are changes in substrate directory or the current workflow
changes_cumulus:
value: ${{ jobs.preflight.outputs.changes_cumulus }}
description: |
True iff there are changes in cumulus directory or the current workflow
changes_polkadot:
value: ${{ jobs.preflight.outputs.changes_polkadot }}
description: |
True iff there are changes in polkadot directory or the current workflow
changes_bridges:
value: ${{ jobs.preflight.outputs.changes_bridges }}
description: |
True iff there are changes in bridges directory or the current workflow
changes_templates:
value: ${{ jobs.preflight.outputs.changes_templates }}
description: |
True iff there are changes in templates directory or the current workflow
ZOMBIENET_IMAGE:
value: ${{ jobs.preflight.outputs.ZOMBIENET_IMAGE }}
Expand Down Expand Up @@ -77,6 +99,11 @@ jobs:
runs-on: ubuntu-latest
outputs:
changes_substrate: ${{ steps.set_changes.outputs.substrate_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_cumulus: ${{ steps.set_changes.outputs.cumulus_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_polkadot: ${{ steps.set_changes.outputs.polkadot_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_bridges: ${{ steps.set_changes.outputs.bridges_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
changes_templates: ${{ steps.set_changes.outputs.templates_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}


ZOMBIENET_IMAGE: ${{ steps.set_vars.outputs.ZOMBIENET_IMAGE }}
ZOMBIENET_RUNNER: ${{ steps.set_vars.outputs.ZOMBIENET_RUNNER }}
Expand Down Expand Up @@ -117,6 +144,14 @@ jobs:
files_yaml: |
substrate:
- 'substrate/**/*'
cumulus:
- 'cumulus/**/*'
polkadot:
- 'polkadot/**/*'
bridges:
- 'bridges/**/*'
templates:
- 'templates/**/*'
currentWorkflow:
- '${{ steps.current_file.outputs.currentWorkflowFile }}'
- '.github/workflows/zombienet-reusable-preflight.yml'
Expand Down Expand Up @@ -183,6 +218,7 @@ jobs:
#
# Wait until the 'build and push' image workflow success
wait_build_images:
needs: [ci-env]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zombienet_substrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
zombienet-substrate-0000-block-building:
needs: [preflight]
# only run if we have changes in ./substrate directory and the build workflow already finish with success status.
if: ${{ (needs.preflight.outputs.changes_substrate && github.event.workflow_run.conclusion == 'success') || github.event_name == 'workflow_dispatch' }}
if: ${{ needs.preflight.outputs.changes_substrate || github.event_name == 'workflow_dispatch' }}
runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes)
timeout-minutes: 60
container:
Expand Down

0 comments on commit 3b04bea

Please sign in to comment.