From cd3492ecbc820cd038fb21ea30351fe03b8acd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sat, 2 Mar 2024 20:41:18 +0100 Subject: [PATCH] Fix colcon list (#23) --- .github/actions/set-package-list/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/set-package-list/action.yml b/.github/actions/set-package-list/action.yml index 10e127a..535d6c1 100644 --- a/.github/actions/set-package-list/action.yml +++ b/.github/actions/set-package-list/action.yml @@ -17,8 +17,14 @@ runs: using: 'composite' steps: - id: colcon + # if a path is given, list the packages in the given path and its subdirectories from the path + # if no path is given, list all packages in the workspace run: | - echo "package_list=$(colcon list --paths ${{ inputs.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ inputs.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_OUTPUT + if [[ -n "${{ inputs.path }}" ]]; then + echo "package_list=$(colcon list --paths ${{ inputs.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ inputs.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_OUTPUT + else + echo "package_list=$(colcon list --names-only | tr '\n' ' ')" >> $GITHUB_OUTPUT + fi shell: bash - id: split_repo run: |