Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Release v0.1.0

Release v0.1.0 #13

Workflow file for this run

name: main
on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
jobs:
ament-lint:
name: ament-${{ matrix.linter }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
linter:
- copyright
- xmllint
- flake8
- pep257
- lint_cmake
- cpplint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ROS2
uses: ros-tooling/setup-ros@master
with:
required-ros-distributions: humble
- name: Run linters
uses: ros-tooling/action-ros-lint@master
with:
distribution: humble
linter: ${{ matrix.linter }}
package-name: |
turtlesim_interfaces
turtlesim_controller
turtlebot3_controller
build-and-test:
needs: [ament-lint]
name: build-${{ matrix.ros_distribution }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ros_distribution:
- humble
- iron
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ROS2
uses: ros-tooling/setup-ros@master
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Build and test
uses: ros-tooling/action-ros-ci@master
with:
package-name: |
turtlebot3_controller
turtlesim_controller
turtlesim_interfaces
target-ros2-distro: ${{ matrix.ros_distribution }}
docker-build-and-push:
name: docker-build-and-push
needs: [ament-lint, build-and-test]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
luizcarloscf/autonomous-robots
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}