-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Check dash | ||
|
||
An action using [dash-license](https://github.com/eclipse/dash-licenses) to generate a license report and upload | ||
results. | ||
|
||
# How to use | ||
|
||
You need an input file that Dash can understand, then give it as input like below | ||
|
||
``` | ||
- name: Dash license check | ||
uses: eclipse-kuksa/kuksa-actions/check-dash@2 | ||
with: | ||
dashinput: ${{github.workspace}}/dash-databroker-deps | ||
``` | ||
|
||
|
||
The uploaded result will be a zip file containing an `*.out` file with result similar to this: | ||
|
||
``` | ||
[main] INFO Querying Eclipse Foundation for license data for 217 items. | ||
[main] INFO Found 43 items. | ||
[main] INFO Querying ClearlyDefined for license data for 174 items. | ||
[main] INFO Found 174 items. | ||
[main] INFO Vetted license information was found for all content. No further investigation is required. | ||
``` | ||
|
||
More deatils are included in the `*.report` file. The input file is also uploaded. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
name: Checking dependencies with dash-license tool | ||
description: Check an input file via dash, and archive report. Print output in build step summary. Requires wget and will install JRE on the runner | ||
|
||
inputs: | ||
dashinput: | ||
required: true | ||
type: string | ||
description: "Dash Input file" | ||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Installing JVM, needed for Dash | ||
shell: bash | ||
run: sudo apt update && sudo apt-get install -y default-jre | ||
- name: "Run Dash" | ||
shell: bash | ||
run: | | ||
wget -O dash.jar "https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=LATEST" | ||
java -jar dash.jar -summary ${{ inputs.dashinput }}.report ${{ inputs.dashinput }} > ${{ inputs.dashinput }}.out 2>&1 || true | ||
echo -e "Dash output: \n\`\`\` " >> $GITHUB_STEP_SUMMARY | ||
cat ${{ inputs.dashinput }}.out >> $GITHUB_STEP_SUMMARY | ||
echo -e "\n\`\`\`" | ||
- name: "Archive dash artifacts" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "Dash data" | ||
path: | | ||
${{ inputs.dashinput }} | ||
${{ inputs.dashinput }}.report | ||
${{ inputs.dashinput }}.out |