Skip to content

Add docker files for debian and rhel #15

Add docker files for debian and rhel

Add docker files for debian and rhel #15

---
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'
jobs:
build_images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- ros_distro: 'humble'
rhel_version: 'rhel8'
- ros_distro: 'jazzy'
rhel_version: 'rhel9'
- ros_distro: 'rolling'
rhel_version: 'rhel9'
steps:
- uses: actions/checkout@v4
- 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 }}