diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index d535020..83c816f 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -11,11 +11,6 @@ on: - synchronize - reopened - ready_for_review - push: - branches: - - "main" - - "**/dev/**" - - "release/**" permissions: contents: read diff --git a/.github/workflows/dependabot_onpush.yml b/.github/workflows/dependabot_onpush.yml new file mode 100644 index 0000000..906d7b0 --- /dev/null +++ b/.github/workflows/dependabot_onpush.yml @@ -0,0 +1,32 @@ + +name: 'Dependency review' +on: + push: + branches: + - "main" + - "**/dev/**" + - "release/**" + +permissions: + contents: read + # Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option + # pull-requests: write + +env: + HEAD_REF: ${{ github.event.ref }} + BASE_REF: ${{ (github.event.base_ref != null) && github.event.base_ref || github.event.ref }} + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout repository' + uses: actions/checkout@v4 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v4 + with: + comment-summary-in-pr: always + fail-on-severity: low + deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later + base-ref: ${{ env.BASE_REF }} + head-ref: ${{ env.HEAD_REF }} diff --git a/.github/workflows/manual_dependabot.yml b/.github/workflows/manual_dependabot.yml index 6d599eb..965aab7 100644 --- a/.github/workflows/manual_dependabot.yml +++ b/.github/workflows/manual_dependabot.yml @@ -51,6 +51,10 @@ permissions: # Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option # pull-requests: write +env: + HEAD_REF: ${{ github.event.ref }} + BASE_REF: ${{ (github.event.base_ref != null) && github.event.base_ref || github.event.ref }} + jobs: dependency-review_with_allow_licenses: runs-on: ubuntu-latest @@ -65,6 +69,8 @@ jobs: allow-licenses: ${{ inputs['license-selection'] }} warn-only: ${{ inputs['warn-only'] }} fail-on-scopes: ${{ inputs['scopes'] }} + base-ref: ${{ env.BASE_REF }} + head-ref: ${{ env.HEAD_REF }} dependency-review_with_deny_licenses: runs-on: ubuntu-latest if: ${{ inputs['license-action'] == 'deny' }} @@ -78,3 +84,5 @@ jobs: deny-licenses: ${{ inputs['license-selection'] }} warn-only: ${{ inputs['warn-only'] }} fail-on-scopes: ${{ inputs['scopes'] }} + base-ref: ${{ env.BASE_REF }} + head-ref: ${{ env.HEAD_REF }}