From 4e5a8df4db3d20e5ba66bcab0ce3d68a7070a08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20M=C3=BCller?= Date: Sun, 24 Nov 2024 10:29:50 +0000 Subject: [PATCH] feat: split `licenses` input by new line instead of space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows to specify licenses with spaces such as 'Apache-2.0 WITH LLVM-exception'. To make this work, `xargs` is changed to split the input string by new line instead of any white space. Signed-off-by: Ingo Müller --- action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 5208f10..66fe00b 100644 --- a/action.yml +++ b/action.yml @@ -8,13 +8,15 @@ branding: inputs: licenses: description: > - A space-separated list of all accepted licenses. For example: + A newline-separated list of all accepted licenses. For example: - Apache-2.0 MIT + licenses: |- + Apache-2.0 + Apache-2.0 WITH LLVM-exception required: true default: '' runs: using: "composite" steps: - - run: echo "${{ inputs.licenses }}" | xargs $GITHUB_ACTION_PATH/verify-spdx-headers + - run: echo "${{ inputs.licenses }}" | xargs -d "\n" $GITHUB_ACTION_PATH/verify-spdx-headers shell: bash