Skip to content

Merge pull request #1 from LCAS/opengl #6

Merge pull request #1 from LCAS/opengl

Merge pull request #1 from LCAS/opengl #6

name: Build OpenGL-supported Docker Images
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
schedule:
- cron: '30 2 * * 0,2,4,6'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- base_image: ubuntu:jammy
ros_distro: humble
push_tag: lcas.lincoln.ac.uk/lcas/ros:jammy-humble
- base_image: nvidia/cuda:11.8.0-runtime-ubuntu22.04
ros_distro: humble
push_tag: lcas.lincoln.ac.uk/lcas/ros:jammy-humble-cuda-opengl
steps:
- uses: actions/checkout@v3
- name: What
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Docker Login LCAS
if: ${{ github.event_name != 'pull_request' }}
# You may pin to the exact commit or the version.
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
# Server address of Docker registry. If not set then will default to Docker Hub
registry: lcas.lincoln.ac.uk
# Username used to log against the Docker registry
username: ${{ secrets.LCAS_REGISTRY_PUSHER }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.LCAS_REGISTRY_TOKEN }}
- name: Build Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.opengl
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ matrix.push_tag }}
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
BRANCH=${{ env.BRANCH }}
ROS_DISTRO=${{ matrix.ros_distro }}