From 05c6afff6d313a370bb928def5ea8ed73891ec4f Mon Sep 17 00:00:00 2001 From: David Sloan Date: Thu, 4 Apr 2024 09:57:09 +0100 Subject: [PATCH] Add initiate stage Extract tag or branch name --- .github/workflows/build.yml | 13 +++++++------ .github/workflows/release.yml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 698e40cad..c765393e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,9 @@ on: modules: description: "Stream reactor collection of modules" value: ${{ jobs.initiate.outputs.matrix }} - + dep_check_modules: + description: "Modules for dependency checking" + value: ${{ jobs.initiate.outputs.dep_check_matrix }} jobs: initiate: timeout-minutes: 5 @@ -218,10 +220,9 @@ jobs: path: ~/**/target/libs/*.jar key: assembly-${{ matrix.module }}-${{ github.run_id }} fail-on-cache-miss: true - - name: Extract branch name - shell: bash - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - id: extract_branch + - name: Get branch names. + id: branch_name + uses: tj-actions/branch-names@v8 - name: Dependency Check uses: dependency-check/Dependency-Check_Action@main with: @@ -230,7 +231,7 @@ jobs: format: 'HTML' args: >- --failOnCVSS 5 - --suppression https://raw.githubusercontent.com/lensesio/stream-reactor/${{ steps.extract_branch.outputs.branch }}/suppression.xml + --suppression https://raw.githubusercontent.com/${{ github.repository }}/${{ steps.branch_name.outputs.tag }}${{ steps.branch_name.outputs.current_branch }}/suppression.xml - name: Upload Test results uses: actions/upload-artifact@master with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 331ca6e1d..92226acb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - module: ${{fromJSON(needs.initiate.outputs.dep_check_matrix)}} + module: ${{fromJSON(needs.build.outputs.dep_check_modules)}} steps: - uses: actions/checkout@v4 - name: Restore assembly