-
-
Notifications
You must be signed in to change notification settings - Fork 324
51 lines (46 loc) · 1.27 KB
/
ci_manager.yml
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
name: CI Manager
on:
pull_request:
jobs:
check-changes:
runs-on: ubuntu-24.04
permissions:
pull-requests: read
outputs:
zig: ${{ steps.filter.outputs.zig }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
zig:
- 'src/**'
- 'build.zig'
- 'build.zig.zon'
call-zig-workflow:
needs: check-changes
if: needs.changes.outputs.zig == 'true'
uses: ./.github/workflows/ci_zig.yml
call-old-workflow:
needs: check-changes
if: needs.changes.outputs.zig != 'true'
uses: ./.github/workflows/ci_manager_old.yml
finish:
needs: [check-changes, call-zig-workflow, call-old-workflow]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check workflow results
run: |
if [[ "${{ needs.changes.outputs.zig }}" == "true" ]]; then
if [[ "${{ needs.call-zig-workflow.result }}" != "success" ]]; then
echo "ci_zig.yml failed."
exit 1
fi
else
if [[ "${{ needs.call-old-workflow.result }}" != "success" ]]; then
echo "ci_manager_old.yml failed."
exit 1
fi
fi