Skip to content

Commit

Permalink
wait on demo build to succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
ibizaman committed Oct 26, 2024
1 parent 61faa8f commit 80e9227
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -53,4 +66,15 @@ jobs:
--show-trace \
build .#nixosConfigurations.${{ matrix.demo.flake }}.config.system.build.vm
result:
runs-on: ubuntu-latest
needs: [ "build" ]
if: '!cancelled()'
steps:
- run: |
result="${{ needs.tests.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi

0 comments on commit 80e9227

Please sign in to comment.