diff --git a/check-dash/README.md b/check-dash/README.md new file mode 100644 index 0000000..d02b4b4 --- /dev/null +++ b/check-dash/README.md @@ -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 details are included in the `*.report` file. The input file is also uploaded. \ No newline at end of file diff --git a/check-dash/action.yml b/check-dash/action.yml new file mode 100644 index 0000000..26f8d9b --- /dev/null +++ b/check-dash/action.yml @@ -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