Skip to content

Commit

Permalink
feat: split licenses input by new line instead of space
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ingomueller-net authored and github-actions[bot] committed Nov 24, 2024
1 parent 8524ffc commit 8dd1a10
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8dd1a10

Please sign in to comment.