Skip to content

CI ROS images

CI ROS images #2261

Workflow file for this run

---
name: CI ROS images
on:
pull_request:
paths:
- '.ci/**'
- '.github/workflows/ros_ci.yaml'
- 'ros/rolling/**'
- 'ros/jazzy/**'
- 'ros/iron/**'
- 'ros/humble/**'
- 'ros/noetic/**'
push:
paths:
- '.ci/**'
- '.github/workflows/ros_ci.yaml'
- 'ros/rolling/**'
- 'ros/jazzy/**'
- 'ros/iron/**'
- 'ros/humble/**'
- 'ros/noetic/**'
schedule:
# Trigger daily to check for upstream changes
- cron: '0 0 * * *'
jobs:
check_images:
strategy:
fail-fast: false
matrix:
env:
- {HUB_REPO: ros, HUB_RELEASE: rolling, HUB_OS_NAME: ubuntu, HUB_OS_CODE_NAME: noble}
- {HUB_REPO: ros, HUB_RELEASE: jazzy, HUB_OS_NAME: ubuntu, HUB_OS_CODE_NAME: noble}
- {HUB_REPO: ros, HUB_RELEASE: iron, HUB_OS_NAME: ubuntu, HUB_OS_CODE_NAME: jammy}
- {HUB_REPO: ros, HUB_RELEASE: humble, HUB_OS_NAME: ubuntu, HUB_OS_CODE_NAME: jammy}
- {HUB_REPO: ros, HUB_RELEASE: noetic, HUB_OS_NAME: ubuntu, HUB_OS_CODE_NAME: focal}
runs-on: ubuntu-latest
env:
GITHUBEMAIL: ${{ secrets.GITHUBEMAIL }}
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
GITHUBUSER: ${{ secrets.GITHUBUSER }}
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
python-version: 3.x
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Install requirements
run: |
pip install -r docker/requirements.txt
pip install -r .ci/requirements.txt
- name: Check and build ROS image
env: ${{matrix.env}}
run: .ci/ci_script.py
- name: Set up Docker Buildx
if: github.ref == 'refs/heads/master'
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.ref == 'refs/heads/master'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Check and build ROS image
if: github.ref == 'refs/heads/master'
env: ${{matrix.env}}
run: |
cd $HUB_REPO/$HUB_RELEASE/$HUB_OS_NAME/$HUB_OS_CODE_NAME
make ci_buildx