-
Notifications
You must be signed in to change notification settings - Fork 30
52 lines (46 loc) · 1.16 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: build
on:
push:
branches:
- main
pull_request:
jobs:
filter:
runs-on: ubuntu-latest
outputs:
filter: ${{ steps.filter.outputs.demo == 'true' || steps.filter.outputs.workflows == 'true' }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/filters.yml
demo:
needs: filter
if: ${{ needs.filter.outputs.filter == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dfx
uses: dfinity/setup-dfx@main
with:
dfx-version: "0.9.2"
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Demo
run: sh demo.sh
aggregate:
name: demo:required
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [demo, filter]
steps:
- name: Check demo result
if: ${{ needs.demo.result != 'success' && needs.filter.outputs.filter == 'true' }}
run: exit 1