Skip to content

Improve docker workflows and add rhel and debian stack build #126

Improve docker workflows and add rhel and debian stack build

Improve docker workflows and add rhel and debian stack build #126

---
name: Build and publish RHEL docker images
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/build_and_publish_rhel_docker.yaml'
- 'ros2_rhel/**'
schedule:
- cron: '1 0 * * MON'
concurrency:
# cancel previous runs of the same workflow, except for pushes on given branches
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads') }}
jobs:
build_images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- ros_distro: humble
rhel_version: rhel8
source_packages: rsl generate_parameter_library generate_parameter_library_py
- ros_distro: jazzy
rhel_version: rhel9
source_packages: pinocchio
- ros_distro: kilted
rhel_version: rhel9
source_packages: pinocchio
- ros_distro: rolling
rhel_version: rhel9
source_packages: pinocchio
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: ros2_rhel
push: true
file: ros2_rhel/Dockerfile.${{ matrix.rhel_version }}
tags: ghcr.io/${{ github.repository_owner }}/ros:${{ matrix.ros_distro }}-rhel
build-args: |
ROS_DISTRO=${{ matrix.ros_distro }}
SOURCE_PACKAGES=${{ matrix.source_packages }}
stack-build:
needs: build_images
uses: ./.github/workflows/reusable-rhel-binary-build.yml
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling, humble, jazzy, kilted]
with:
ros_distro: ${{ matrix.ROS_DISTRO }}
target_workspace: ros_controls.${{ matrix.ROS_DISTRO }}.repos
skip_packages_regex: '^mujoco_ros2_control.*$|^gz_ros2_control.*$|^ros2_control_demo_example_9$|^ros2_control_demos$'
ref_for_scheduled_build: master