-
Notifications
You must be signed in to change notification settings - Fork 41
53 lines (45 loc) · 1.37 KB
/
build.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
52
53
name: Build image
on: push
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
check-changes: ${{ steps.filter.outputs.check-changes }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
check-changes:
- 'image_builder/**'
- 'scripts/**'
- 'Makefile'
- 'ros-rt-img'
- '.github/workflows/build.sh'
- '.github/workflows/setup-dependencies.sh'
- '.github/workflows/build.yml'
build-focal:
needs: changes
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.check-changes == 'true' }}
steps:
- uses: actions/checkout@v2
- name: Setup build dependencies
run: .github/workflows/setup-dependencies.sh
- name: Build image
run: .github/workflows/build.sh focal-rt-ros2
build-jammy:
needs: changes
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.check-changes == 'true' }}
steps:
- uses: actions/checkout@v2
- name: Setup build dependencies
run: .github/workflows/setup-dependencies.sh
- name: Build image
run: .github/workflows/build.sh jammy-rt-ros2
# TODO: release image