-
Notifications
You must be signed in to change notification settings - Fork 5
154 lines (147 loc) · 5.66 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: "Build Docker image"
on:
pull_request:
push:
branches:
- master
schedule:
# Run the CI automatically every day to look for flakyness.
- cron: '0 0 * * *'
jobs:
build_ubuntu_docker_image:
strategy:
fail-fast: false
matrix:
base_image_name: [ubuntu]
base_image_tag: [focal, jammy]
name: "${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}"
# always use latest linux worker, as it should not have any impact
# when it comes to building docker images.
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Set up docker buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
build-args: |
BASE_IMAGE_NAME=${{ matrix.base_image_name }}
BASE_IMAGE_TAG=${{ matrix.base_image_tag }}
VCS_REF=${{ github.sha }}
ROS_DISTRO=none
tags: |
rostooling/setup-ros-docker:${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}-latest
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}:master
build_ubuntu_docker_image_ros:
strategy:
fail-fast: false
matrix:
base_image_name: [ubuntu]
ros_distro: [noetic, humble, iron, rolling]
ros_variant: [desktop, ros-base]
include:
# Noetic Ninjemys (May 2020 - May 2025)
- ros_distro: noetic
base_image_tag: focal
ros_variant: desktop
rmw_implementations:
output_image_tag: ubuntu-focal-ros-noetic-desktop
- ros_distro: noetic
base_image_tag: focal
ros_variant: ros-base
rmw_implementations:
output_image_tag: ubuntu-focal-ros-noetic-ros-base
# Humble Hawksbill (May 2022 - May 2027)
- ros_distro: humble
base_image_tag: jammy
ros_variant: desktop
rmw_implementations: ros-humble-rmw-fastrtps-cpp,ros-humble-rmw-cyclonedds-cpp,ros-humble-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-humble-desktop
- ros_distro: humble
base_image_tag: jammy
ros_variant: ros-base
rmw_implementations: ros-humble-rmw-fastrtps-cpp,ros-humble-rmw-cyclonedds-cpp,ros-humble-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-humble-ros-base
# Iron Irwini (May 2023 - November 2024)
- ros_distro: iron
base_image_tag: jammy
ros_variant: desktop
rmw_implementations: ros-iron-rmw-fastrtps-cpp,ros-iron-rmw-cyclonedds-cpp,ros-iron-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-iron-desktop
- ros_distro: iron
base_image_tag: jammy
ros_variant: ros-base
rmw_implementations: ros-iron-rmw-fastrtps-cpp,ros-iron-rmw-cyclonedds-cpp,ros-iron-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-iron-ros-base
# Rolling Ridley (June 2020 - Ongoing)
- ros_distro: rolling
base_image_tag: jammy
ros_variant: desktop
rmw_implementations: ros-rolling-rmw-fastrtps-cpp,ros-rolling-rmw-cyclonedds-cpp,ros-rolling-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-rolling-desktop
- ros_distro: rolling
base_image_tag: jammy
ros_variant: ros-base
rmw_implementations: ros-rolling-rmw-fastrtps-cpp,ros-rolling-rmw-cyclonedds-cpp,ros-rolling-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-rolling-ros-base
name: "${{ matrix.output_image_tag }}"
# always use latest linux worker, as it should not have any impact
# when it comes to building docker images.
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Set up docker buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
build-args: |
BASE_IMAGE_NAME=${{ matrix.base_image_name }}
BASE_IMAGE_TAG=${{ matrix.base_image_tag }}
EXTRA_APT_PACKAGES=ros-${{ matrix.ros_distro }}-${{ matrix.ros_variant }},${{ matrix.rmw_implementations }}
VCS_REF=${{ github.sha }}
ROS_DISTRO=${{ matrix.ros_distro }}
tags: |
rostooling/setup-ros-docker:${{ matrix.output_image_tag }}-latest
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-${{ matrix.output_image_tag }}:master