Skip to content

Commit

Permalink
CI: only build Willow when needed
Browse files Browse the repository at this point in the history
There is no point in running a Willow build when there aren't any
changes to source files, or other files included in the Willow images.
  • Loading branch information
stintel authored and kristiankielhofner committed Aug 19, 2023
1 parent 99fa79c commit aecf8ad
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-22.04
outputs:
container_any_changed: ${{ steps.changed_files_yaml.outputs.container_any_changed }}
image_any_changed: ${{ steps.changed_files_yaml.outputs.image_any_changed }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -29,14 +30,21 @@ jobs:
- 'Dockerfile'
- 'container.gitconfig'
- 'utils.sh'
image:
- 'CMakeLists.txt'
- 'main/**'
- 'partitions_willow.csv'
- 'sdkconfig.willow'
- 'spiffs/**'
build_container:
if: ${{ needs.trigger_workflow.outputs.container_any_changed == 'true' }}
uses: ./.github/workflows/build-container.yml
needs: trigger_workflow

build_willow:
if: ${{ needs.trigger_workflow.outputs.container_any_changed == 'false' }}
if: ${{ needs.trigger_workflow.outputs.container_any_changed == 'false' && needs.trigger_workflow.outputs.image_any_changed == 'true' }}
uses: ./.github/workflows/build-willow.yml
needs: trigger_workflow
with:
Expand Down

0 comments on commit aecf8ad

Please sign in to comment.