From 168ae108a8d173bb305b693ec66dcd794dadd6ac Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Mon, 2 Oct 2023 23:02:07 -0700 Subject: [PATCH] Use new action in other jobs --- .github/actions/checkout/action.yml | 2 +- .github/workflows/test_definitions.yml | 30 ++++++-------------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml index d26a21c7d..c616eeeb1 100644 --- a/.github/actions/checkout/action.yml +++ b/.github/actions/checkout/action.yml @@ -17,7 +17,7 @@ runs: path: src/${{ inputs.repository }} - name: Checkout custom_interfaces ROS package - # if: ${{ inputs.repository != 'sailbot_workspace' && inputs.repository != 'custom_interfaces' }} + if: ${{ inputs.repository != 'sailbot_workspace' && inputs.repository != 'custom_interfaces' }} uses: actions/checkout@v4 with: repository: UBCSailbot/custom_interfaces diff --git a/.github/workflows/test_definitions.yml b/.github/workflows/test_definitions.yml index aeca998e3..c775f0e1d 100644 --- a/.github/workflows/test_definitions.yml +++ b/.github/workflows/test_definitions.yml @@ -47,19 +47,10 @@ jobs: with: repository: UBCSailbot/sailbot_workspace - - name: Checkout ROS package - if: ${{ inputs.repository != 'sailbot_workspace' }} - uses: actions/checkout@v4 - with: - repository: UBCSailbot/${{ inputs.repository }} - path: src/${{ inputs.repository }} - - - name: Checkout custom_interfaces ROS package - if: ${{ inputs.repository != 'sailbot_workspace' && inputs.repository != 'custom_interfaces' }} - uses: actions/checkout@v4 + - name: Checkout repositories + uses: ./.github/actions/checkout/ with: - repository: UBCSailbot/custom_interfaces - path: src/custom_interfaces + repository: ${{ inputs.repository }} - name: Test uses: ./.github/actions/test/ @@ -101,19 +92,10 @@ jobs: with: repository: UBCSailbot/sailbot_workspace - - name: Checkout ROS package - if: ${{ inputs.repository != 'sailbot_workspace' }} - uses: actions/checkout@v4 - with: - repository: UBCSailbot/${{ inputs.repository }} - path: src/${{ inputs.repository }} - - - name: Checkout custom_interfaces ROS package - if: ${{ inputs.repository != 'sailbot_workspace' && inputs.repository != 'custom_interfaces' }} - uses: actions/checkout@v4 + - name: Checkout repositories + uses: ./.github/actions/checkout/ with: - repository: UBCSailbot/custom_interfaces - path: src/custom_interfaces + repository: ${{ inputs.repository }} - name: Run linter uses: ./.github/actions/clang-tidy/