diff --git a/.github/workflows/linters_via_pre_commit.yaml b/.github/workflows/linters_via_pre_commit.yaml new file mode 100644 index 0000000..540c1f3 --- /dev/null +++ b/.github/workflows/linters_via_pre_commit.yaml @@ -0,0 +1,26 @@ +name: Linters via pre commit + +on: + workflow_call: + +inputs: + ros_distro: + required: true + type: string + +jobs: + linters_via_pre_commit: + name: Linters via pre commit + runs-on: ubuntu-latest + container: + image: "ghcr.io/naturerobots/ros2_${{ inputs.ros_distro }}_build:latest" + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + options: + --user root + steps: + - uses: actions/checkout@v4 + - uses: pre-commit/action@v3.0.1 + with: + extra_args: --all-files --hook-stage manual diff --git a/.github/workflows/humble_ci.yaml b/.github/workflows/ros_ci.yaml similarity index 85% rename from .github/workflows/humble_ci.yaml rename to .github/workflows/ros_ci.yaml index 6ed358a..c3ed943 100644 --- a/.github/workflows/humble_ci.yaml +++ b/.github/workflows/ros_ci.yaml @@ -1,8 +1,13 @@ -name: Humble CI - Build and Test +name: ROS Build and Test on: workflow_call: +inputs: + ros_distro: + required: true + type: string + jobs: build_and_test: runs-on: ubuntu-latest @@ -10,7 +15,7 @@ jobs: contents: read packages: read container: - image: ghcr.io/naturerobots/ros2_humble_build:latest + image: ghcr.io/naturerobots/ros2_${{ inputs.ros_distro }}_build:latest credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -31,8 +36,8 @@ jobs: - name: Build and test uses: ros-tooling/action-ros-ci@0.3.13 with: - package-name: ${{env.PACKAGES_FOR_CI}} - target-ros2-distro: humble + package-name: ${{ env.PACKAGES_FOR_CI }} + target-ros2-distro: ${{ inputs.ros_distro }} vcs-repo-file-url: $GITHUB_WORKSPACE/source_dependencies.yaml rosdep-check: true import-token: ${{ secrets.ORGANIZATION_PRIVATE_PAT }}