-
Notifications
You must be signed in to change notification settings - Fork 17
46 lines (42 loc) · 1.21 KB
/
docker_ci_pipeline.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
name: Docker CI pipeline
on:
push:
branches: [ main ]
paths:
- 'docker/**'
- '**/package.xml'
pull_request:
branches: [ main ]
paths:
- 'docker/**'
- '**/package.xml'
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday
jobs:
build-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ros_distro:
- noetic
- humble
- iron
- jazzy
- rolling
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v2
with:
context: .
file: docker/images/${{ matrix.ros_distro }}/Dockerfile
tags: ekumen/beluga-${{ matrix.ros_distro }}-dev:latest
push: false
cache-from: |
type=gha,scope=docker-${{ matrix.ros_distro }}-${{ github.head_ref || github.ref_name }}
type=gha,scope=docker-${{ matrix.ros_distro }}-${{ github.base_ref || github.ref_name }}
cache-to: type=gha,mode=min,scope=docker-${{ matrix.ros_distro }}-${{ github.head_ref || github.ref_name }}