diff --git a/.github/workflows/reusable-pre-commit.yml b/.github/workflows/reusable-pre-commit.yml index 5ee5259..d050c0c 100644 --- a/.github/workflows/reusable-pre-commit.yml +++ b/.github/workflows/reusable-pre-commit.yml @@ -18,7 +18,17 @@ jobs: - uses: actions/checkout@v4 - uses: ros-tooling/setup-ros@0.7.1 - name: Install system hooks - run: sudo apt-get install -qq ros-${{ inputs.ros_distro }}-ament-cppcheck ros-${{ inputs.ros_distro }}-ament-cpplint ros-${{ inputs.ros_distro }}-ament-lint-cmake ros-${{ inputs.ros_distro }}-ament-copyright + run: | + sudo apt-get install -qq ros-${{ inputs.ros_distro }}-ament-cppcheck ros-${{ inputs.ros_distro }}-ament-cpplint ros-${{ inputs.ros_distro }}-ament-lint-cmake ros-${{ inputs.ros_distro }}-ament-copyright + source /opt/ros/${{ inputs.ros_distro }}/setup.bash + echo ROS_PATH=$PATH >> $GITHUB_ENV + - env: + PATH: ${{ env.ROS_PATH }} + run: | + echo $PATH + python --version - uses: pre-commit/action@v3.0.1 + env: + PATH: ${{ env.ROS_PATH }} with: extra_args: --all-files --hook-stage manual