Skip to content

Commit a161b0b

Browse files
committed
Update Docker build step to use build-push-action for teleop_ros2 image
1 parent ebae3f3 commit a161b0b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/build-ubuntu.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,18 @@ jobs:
168168
uses: docker/setup-buildx-action@v4.0.0
169169

170170
- name: Build teleop_ros2 image
171-
run: |
172-
docker build -f examples/teleop_ros2/Dockerfile \
173-
--build-arg ROS_DISTRO=${{ matrix.ros_distro }} \
174-
--build-arg PYTHON_VERSION=${{ matrix.python_version }} \
175-
-t teleop_ros2_ref:${{ matrix.ros_distro }} .
171+
uses: docker/build-push-action@v7
172+
with:
173+
context: .
174+
file: examples/teleop_ros2/Dockerfile
175+
build-args: |
176+
ROS_DISTRO=${{ matrix.ros_distro }}
177+
PYTHON_VERSION=${{ matrix.python_version }}
178+
tags: teleop_ros2_ref:${{ matrix.ros_distro }}
179+
load: true
180+
push: false
181+
cache-from: type=gha,scope=teleop-ros2-${{ matrix.ros_distro }}
182+
cache-to: type=gha,mode=max,scope=teleop-ros2-${{ matrix.ros_distro }}
176183

177184
- name: Smoke test (ROS 2 + rclpy)
178185
run: |

0 commit comments

Comments
 (0)