From 138ef182c3255cd3fc64a68757f15bc9533f6c1f Mon Sep 17 00:00:00 2001 From: Erik Jaegervall Date: Wed, 4 Oct 2023 13:56:26 +0200 Subject: [PATCH] Use common action for dash --- .github/actions/check-dash/action.yml | 31 ----------------- .../workflows/kuksa_databroker-cli_build.yml | 34 +++++++++++-------- .github/workflows/kuksa_databroker_build.yml | 32 ++++++++++------- 3 files changed, 38 insertions(+), 59 deletions(-) delete mode 100644 .github/actions/check-dash/action.yml diff --git a/.github/actions/check-dash/action.yml b/.github/actions/check-dash/action.yml deleted file mode 100644 index 8e98f0a76..000000000 --- a/.github/actions/check-dash/action.yml +++ /dev/null @@ -1,31 +0,0 @@ - -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 an JRE on the runner - -inputs: - dashinput: - required: true - type: string - description: "Dash Input file" - - -runs: - using: "composite" - steps: - - 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 \ No newline at end of file diff --git a/.github/workflows/kuksa_databroker-cli_build.yml b/.github/workflows/kuksa_databroker-cli_build.yml index e0798fe0a..db0fe5f32 100644 --- a/.github/workflows/kuksa_databroker-cli_build.yml +++ b/.github/workflows/kuksa_databroker-cli_build.yml @@ -36,8 +36,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Installing JVM - run: sudo apt update && sudo apt-get install -y default-jre - uses: actions/checkout@v3 - name: cargo fmt working-directory: ${{github.workspace}} @@ -46,19 +44,6 @@ jobs: working-directory: ${{github.workspace}} run: cargo clippy --all-targets -- -W warnings -D warnings - - name: "Createbom: License check and Dash output generation" - working-directory: ${{github.workspace}}/kuksa_databroker/createbom - run: | - cargo install cargo-license - python3 createbom.py --dash ${{github.workspace}}/dash-databroker-cli-deps ../databroker-cli - - - name: Dash license check - uses: ./.github/actions/check-dash - with: - dashinput: ${{github.workspace}}/dash-databroker-cli-deps - - - checkrights: uses: ./.github/workflows/check_push_rights.yml secrets: inherit @@ -160,3 +145,22 @@ jobs: src: /app/ export: true transform: s/app/databroker-cli/ + + bom: + name: Bill of Material Check + runs-on: ubuntu-latest + needs: build-container + + steps: + - uses: actions/checkout@v3 + + - name: "Createbom: License check and Dash output generation" + working-directory: ${{github.workspace}}/kuksa_databroker/createbom + run: | + cargo install cargo-license + python3 createbom.py --dash ${{github.workspace}}/dash-databroker-deps ../databroker + + - name: Dash license check + uses: erikbosch/kuksa-actions/check-dash@erik_dash + with: + dashinput: ${{github.workspace}}/dash-databroker-deps diff --git a/.github/workflows/kuksa_databroker_build.yml b/.github/workflows/kuksa_databroker_build.yml index 8fed394f0..ac819f3c9 100644 --- a/.github/workflows/kuksa_databroker_build.yml +++ b/.github/workflows/kuksa_databroker_build.yml @@ -36,8 +36,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Installing JVM - run: sudo apt update && sudo apt-get install -y default-jre - uses: actions/checkout@v3 - name: cargo fmt working-directory: ${{github.workspace}} @@ -46,17 +44,6 @@ jobs: working-directory: ${{github.workspace}} run: cargo clippy --all-targets -- -W warnings -D warnings - - name: "Createbom: License check and Dash output generation" - working-directory: ${{github.workspace}}/kuksa_databroker/createbom - run: | - cargo install cargo-license - python3 createbom.py --dash ${{github.workspace}}/dash-databroker-deps ../databroker - - - name: Dash license check - uses: ./.github/actions/check-dash - with: - dashinput: ${{github.workspace}}/dash-databroker-deps - test: name: Test runs-on: ubuntu-latest @@ -208,3 +195,22 @@ jobs: DATABROKER_IMAGE: ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}} run: | ${{github.workspace}}/kuksa_databroker/integration_test/run.sh + + bom: + name: Bill of Material Check + runs-on: ubuntu-latest + needs: build-container + + steps: + - uses: actions/checkout@v3 + + - name: "Createbom: License check and Dash output generation" + working-directory: ${{github.workspace}}/kuksa_databroker/createbom + run: | + cargo install cargo-license + python3 createbom.py --dash ${{github.workspace}}/dash-databroker-deps ../databroker + + - name: Dash license check + uses: erikbosch/kuksa-actions/check-dash@erik_dash + with: + dashinput: ${{github.workspace}}/dash-databroker-deps