-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (51 loc) · 1.39 KB
/
ci.yml
File metadata and controls
56 lines (51 loc) · 1.39 KB
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
53
54
55
56
name: ci
on:
push:
branches:
- develop
pull_request:
branches:
- develop
concurrency:
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
container: ${{ steps.filter.outputs.container }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # @v2
if: ${{ github.event_name == 'push' }}
with:
fetch-depth: 0
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@9d7afb8d214ad99e78fbd4247752c4caed2b6e4c
id: filter
with:
filters: |
container:
- '.github/**'
- 'Dockerfile'
- 'spack.yaml'
container:
if: ${{ needs.changes.outputs.container == 'true' }}
needs: changes
uses: ./.github/workflows/container.yml
all:
needs:
- changes
- container
if: always()
runs-on: ubuntu-latest
steps:
- name: Status summary
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled"
exit 1
else
echo "All jobs completed successfully"
fi