Skip to content

Merge pull request #9 from chiragbheemaiah/dev_Chirag #16

Merge pull request #9 from chiragbheemaiah/dev_Chirag

Merge pull request #9 from chiragbheemaiah/dev_Chirag #16

Workflow file for this run

# Workflow
name: CI Pipeline for ROS2 Turtlebot3
on:
push:
branches:
- main
jobs:
ros2_ci_pipeline:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create bag_of_files directory
run: mkdir bag_of_files
- name: Pull Docker image
run: docker pull chiragbheemaiah/ci_pipeline_using_github_actions:latest
- name: Run commands inside Docker container
run: |
docker run -v $PWD/bag_of_files:/bag_of_files chiragbheemaiah/ci_pipeline_using_github_actions:latest bash -c '
ls -l
export ROS_DOMAIN_ID=30;
export TURTLEBOT3_MODEL=waffle;
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/humble/share/turtlebot3_gazebo/models;
source /opt/ros/humble/setup.bash;
rm -r ci-pipeline-trial;
git clone -b dev_Chirag https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_PASSWORD }}@github.com/chiragbheemaiah/Integrating-Headless-Gazebo-into-GitHub-Actions.git;
cd Integrating-Headless-Gazebo-into-GitHub-Actions/Turtlebot3_ws;
colcon build --symlink-install;
source install/setup.bash;
colcon test --event-handlers console_cohesion+ &
cd ../../bag_of_files;
timeout 200s ros2 bag record -a;
ls -l
'
- name: Upload bag_of_files as artifact
uses: actions/upload-artifact@v2
with:
name: bag_of_files
path: bag_of_files