Skip to content

Commit 062214f

Browse files
bigdazmarcphilipp
authored andcommitted
Add separate dependency-submission workflow
With the introduction of `gradle/actions/dependency-submission`, it is now simpler (and recommended) to use a separate workflow for generation and submission of GitHub Dependency Graph. This workflow attempts to detect and submit all dependencies that would be resolved during build execution, without requiring the execution of any particular task. In basic testing it appears that the generated dependency graph contains the same dependencies as before. A few things to note: The new workflow will submit a dependency graph with a different "correlator" to the previous one. This means that duplicate dependencies (and alerts) may appear until the older graph ages out and is automatically purged. (Period of hours to days). Manually dismissed Dependabot Alerts may need to be re-dismissed after switching to the new workflow.
1 parent f188238 commit 062214f

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

.github/actions/main-build/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@ inputs:
55
required: true
66
description: Gradle arguments
77
default: build
8-
dependency-graph:
9-
required: false
10-
description: 'see https://github.com/gradle/gradle-build-action#enable-dependency-graph-generation-for-a-workflow'
11-
default: disabled
128
runs:
139
using: "composite"
1410
steps:
1511
- uses: ./.github/actions/setup-test-jdk
1612
- uses: ./.github/actions/run-gradle
1713
with:
1814
arguments: ${{ inputs.arguments }}
19-
dependency-graph: ${{ inputs.dependency-graph }}
2015
- uses: actions/upload-artifact@v4
2116
if: ${{ always() }}
2217
with:

.github/actions/run-gradle/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ inputs:
55
required: true
66
description: Gradle arguments
77
default: build
8-
dependency-graph:
9-
required: false
10-
description: 'see https://github.com/gradle/gradle-build-action#enable-dependency-graph-generation-for-a-workflow'
11-
default: disabled
128
runs:
139
using: "composite"
1410
steps:
@@ -21,7 +17,6 @@ runs:
2117
env:
2218
JAVA_HOME: ${{ steps.setup-gradle-jdk.outputs.path }}
2319
with:
24-
dependency-graph: ${{ inputs.dependency-graph }}
2520
arguments: |
2621
-Porg.gradle.java.installations.auto-download=false
2722
-Pjunit.develocity.predictiveTestSelection.enabled=${{ github.event_name == 'pull_request' }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Gradle Dependency Submission
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
dependency-submission:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: 21
24+
- name: Generate and submit dependency graph
25+
uses: gradle/actions/dependency-submission@v3

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
- name: Build
3838
uses: ./.github/actions/main-build
3939
with:
40-
dependency-graph: generate-and-submit
4140
arguments: |
4241
-Ptesting.enableJaCoCo
4342
build

0 commit comments

Comments
 (0)