Skip to content

trigger-event

trigger-event #137

Workflow file for this run

name: ROS2
on:
pull_request:
branches: [ master ]
paths-ignore: '**.md'
push:
branches: [ master ]
paths-ignore: '**.md'
repository_dispatch:
types: [trigger-event]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
DISTRO: [
{ "ubuntu": "noble", "ros": "jazzy", "suffix": "gcc", "label": "jazzy" },
{ "ubuntu": "jammy", "ros": "humble", "suffix": "gcc", "label": "humble" },
{ "ubuntu": "jammy_cuda12.2", "ros": "humble", "suffix": "gcc.cuda", "label": "humble_cuda12.2" },
]
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
path: glim_ros2
submodules: recursive
- uses: actions/checkout@v2
with:
repository: koide3/glim
token: ${{ secrets.PAT }}
path: glim
submodules: recursive
- name: Docker login
continue-on-error: true
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker build
uses: docker/build-push-action@v2
with:
tags: koide3/glim_ros2:${{ matrix.DISTRO.label }}
file: ${{github.workspace}}/glim_ros2/docker/Dockerfile.${{ matrix.DISTRO.suffix }}
build-args: |
BASE_IMAGE=koide3/gtsam_points:${{ matrix.DISTRO.ubuntu }}
ROS_DISTRO=${{ matrix.DISTRO.ros }}
context: .
push: ${{ (github.event_name == 'push' || github.event_name == 'repository_dispatch') && contains(matrix.DISTRO.suffix, 'gcc') }}
dispatch:
needs: build
strategy:
matrix:
repo: ['koide3/glim_ext']
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: ${{ matrix.repo }}
event-type: trigger-event