Skip to content

chore: execute workflow again #226

chore: execute workflow again

chore: execute workflow again #226

Workflow file for this run

name: test
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ubuntu-22.04
container: osrf/ros:humble-desktop-full
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: apt update install
run: |
sudo apt update -y
sudo apt install -y \
psmisc \
rsync \
xvfb \
ros-$ROS_DISTRO-navigation2 \
ros-$ROS_DISTRO-nav2-bringup \
ros-$ROS_DISTRO-turtlebot3-gazebo
- name: build
run: |
mkdir -p /root/ros2_ws/src/emcl2_ros2/
rsync -av ./ /root/ros2_ws/src/emcl2_ros2/
cd /root/ros2_ws
source /opt/ros/$ROS_DISTRO/setup.bash
rosdep update
rosdep install -i -y --from-path src --rosdistro $ROS_DISTRO
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
shell: bash
- name: exec
run: |
source /root/ros2_ws/install/setup.bash
ros2 run emcl2 test.bash
shell: bash
- name: set completion flag
id: complete
run: echo "job_complete=true" >> $GITHUB_ENV
retry:
runs-on: ubuntu-latest
needs: test
if: ${{ always() && needs.build.result == 'failure' }}
steps:
- name: Check if timeout
id: check
run: |
if [[ "${{ needs.build.outputs.job_complete }}" != 'true' ]]; then
echo "::set-output name=timeout::true"
fi
- name: Retry Workflow
if: steps.check.outputs.timeout == 'true'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
await github.actions.createWorkflowDispatch({
owner,
repo,
workflow_id: '${{ github.workflow_id }}',
ref: '${{ github.ref }}',
});