diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 3de0a0b..2d865b4 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -3,18 +3,31 @@ name: Demo on: workflow_dispatch: pull_request: - paths: - - '.github/workflows/demo.yml' - - 'demo/**' push: branches: - main - paths: - - '.github/workflows/demo.yml' - - 'demo/**' jobs: + path-filter: + runs-on: ubuntu-latest + outputs: + changed: ${{ steps.filter.outputs.changed }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + changed: + - '.github/workflows/demo.yml' + - 'demo/**' + build: + needs: [ "path-filter" ] + if: needs.path-filter.outputs.changed == 'true' strategy: matrix: demo: @@ -53,4 +66,9 @@ jobs: --show-trace \ build .#nixosConfigurations.${{ matrix.demo.flake }}.config.system.build.vm + result: + runs-on: ubuntu-latest + needs: [ "build" ] + if: '!cancelled()' +