Skip to content

Commit

Permalink
Base image docker image and nightly CI to push, temporarily running o…
Browse files Browse the repository at this point in the history
…n push

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jan 6, 2025
1 parent 6198d78 commit c6bd63f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/docker/nexus-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG ROS_DISTRO=jazzy
FROM docker.io/ros:$ROS_DISTRO-ros-base
ARG NEXUS_BRANCH=main

RUN apt update && apt install -y git curl libclang-dev clang clang-tools lld

RUN mkdir -p /ws_nexus_base/src && cd /ws_nexus_base \
&& curl --output abb.repos https://raw.githubusercontent.com/osrf/nexus/refs/heads/$NEXUS_BRANCH/abb.repos \
&& vcs import /ws_nexus_base/src < abb.repos \
&& curl --output rmf.repos https://raw.githubusercontent.com/osrf/nexus/refs/heads/$NEXUS_BRANCH/rmf.repos \
&& vcs import /ws_nexus_base/src < rmf.repos

RUN rosdep update && rosdep install --from-paths /ws_nexus_base/src -yi

RUN cd /ws_nexus_base \
&& . /opt/ros/$ROS_DISTRO/setup.sh \
&& colcon build --merge-install --install-base /opt/nexus_base --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& rm -rf /ws_nexus_base

RUN rm -rf \
/var/lib/apt/lists \
/dist
38 changes: 38 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: nightly

# on:
# schedule:
# # 2am SGT
# - cron: '0 18 * * *'

on: [push]

jobs:
build-nexus-base-image:
name: Push nexus base docker image to GitHub Packages
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution: [jazzy]
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to docker
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push nexus-base
uses: docker/build-push-action@v5
with:
push: true
build-args: |
ROS_DISTRO=${{ matrix.ros_distribution }}
NEXUS_BRANCH=base-docker-images
tags: ghcr.io/${{ github.repository }}/nexus-base:${{ matrix.ros_distribution }}-latest
context: .github/docker/nexus-base

0 comments on commit c6bd63f

Please sign in to comment.