Skip to content

Commit 6600d76

Browse files
authored
Restore dependency-submission workflow, fixed for consistent runs (#1800)
* Restore dependency-submission workflow with permissions fix and dependabot/fork PR guard Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Use JDK 25 to match jvm.config flags Signed-off-by: Marvin Froeder <velo.br@gmail.com> --------- Signed-off-by: Marvin Froeder <velo.br@gmail.com>
1 parent 78e67d9 commit 6600d76

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# The workflow name and job id form the snapshot job correlator ("build" via
2+
# the dependency-submission-toolkit). They must stay identical to the workflow
3+
# removed in 69d8be19c so submissions supersede the stale December 2024
4+
# snapshot that keeps old transitive versions alive in the dependency graph
5+
# (and keeps spawning Dependabot alerts for them).
6+
name: Dependabot Dependency Submission
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
pull_request:
13+
branches:
14+
- master
15+
schedule:
16+
- cron: '23 5 * * 1'
17+
workflow_dispatch:
18+
19+
permissions:
20+
contents: write
21+
22+
jobs:
23+
build:
24+
# Dependabot and fork PRs run with a read-only GITHUB_TOKEN, so the
25+
# snapshot submission would 403 and fail the check — the likely reason the
26+
# original workflow was flaky. Skip those; pushes to master are what keep
27+
# the dependency graph fresh.
28+
if: github.event_name != 'pull_request' || (github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork)
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Java JDK
35+
uses: actions/setup-java@v4
36+
with:
37+
distribution: 'temurin'
38+
# .mvn/jvm.config uses JDK 23+ flags (--sun-misc-unsafe-memory-access);
39+
# keep in sync with the JDK the build actually targets
40+
java-version: '25'
41+
cache: maven
42+
43+
- name: Submit Dependency Snapshot
44+
uses: advanced-security/maven-dependency-submission-action@v5.0.0
45+
with:
46+
maven-args: -Pexamples -Dtoolchain.skip=true

0 commit comments

Comments
 (0)