Skip to content

Commit

Permalink
Merge pull request #86 from husarion/ros2-use-branch-name
Browse files Browse the repository at this point in the history
Ros2 use branch name
  • Loading branch information
KmakD authored Sep 12, 2024
2 parents c2c5860 + 98cffa2 commit 95ebe6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ros-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ name: Build/Publish ROS Docker Image
on:
workflow_dispatch:
inputs:
panther_codebase_version:
description: Version of the panther_ros to be used in the docker image (branch/tag/commit).
required: true
type: string
default: ros2-devel
build_type:
description: Is it a "development" or a "stable" release?
required: true
Expand Down Expand Up @@ -48,13 +53,14 @@ jobs:
uses: actions/checkout@v2

- name: Build Docker Image
uses: husarion-ci/ros-docker-img-action@v0.5
uses: husarion-ci/ros-docker-img-action@v0.6
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
main_branch_name: ros2
dockerfile: ${{ matrix.dockerfile }}
repo_name: ${{ matrix.repo_name }}
branch_name: ${{ inputs.panther_codebase_version }}
build_type: ${{ inputs.build_type }}
ros_distro: ${{ matrix.ros_distro }}
platforms: ${{ matrix.platforms }}
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.hardware
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG ROS_DISTRO=humble
ARG BUILD_TEST=OFF

FROM husarnet/ros:${ROS_DISTRO}-ros-core

ARG BRANCH_NAME=ros2-devel
ARG BUILD_TEST=OFF

ENV HUSARION_ROS_BUILD_TYPE=hardware

STOPSIGNAL SIGINT
Expand All @@ -13,7 +15,7 @@ RUN apt-get update && \
apt-get install -y \
ros-dev-tools && \
# Setup workspace
git clone -b ros2-devel https://github.com/husarion/panther_ros.git src/panther_ros && \
git clone -b ${BRANCH_NAME} https://github.com/husarion/panther_ros.git src/panther_ros && \
vcs import src < src/panther_ros/panther/panther_${HUSARION_ROS_BUILD_TYPE}.repos && \
cp -r src/ros2_controllers/diff_drive_controller src && \
cp -r src/ros2_controllers/imu_sensor_broadcaster src && \
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.simulation
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG ROS_DISTRO=humble
ARG BUILD_TEST=OFF

FROM husarnet/ros:${ROS_DISTRO}-ros-core

ARG BRANCH_NAME=ros2-devel
ARG BUILD_TEST=OFF

ENV HUSARION_ROS_BUILD_TYPE=simulation

STOPSIGNAL SIGINT
Expand All @@ -13,7 +15,7 @@ RUN apt-get update && \
apt-get install -y \
ros-dev-tools && \
# Setup workspace
git clone -b ros2-devel https://github.com/husarion/panther_ros.git src/panther_ros && \
git clone -b ${BRANCH_NAME} https://github.com/husarion/panther_ros.git src/panther_ros && \
vcs import src < src/panther_ros/panther/panther_${HUSARION_ROS_BUILD_TYPE}.repos && \
cp -r src/ros2_controllers/diff_drive_controller src && \
cp -r src/ros2_controllers/imu_sensor_broadcaster src && \
Expand Down

0 comments on commit 95ebe6b

Please sign in to comment.