Skip to content

Commit 6bab050

Browse files
authored
ci: clean dependency graph manually (#386)
1 parent 7aecea8 commit 6bab050

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ jobs:
135135
VERSION: 1.17.0
136136
with:
137137
gradle-home-cache-cleanup: true
138-
dependency-graph: generate-and-submit
138+
# https://github.com/gradle/gradle-build-action/issues/791
139+
# dependency-graph: generate-and-submit
139140
arguments: |
140141
sonar -x compileJava -x compileTestJava
141142
--no-daemon
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Clear dependency graph for a correlator
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
job-correlator:
7+
description: Key that is used to group snapshots submitted over time
8+
9+
jobs:
10+
clean-up:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Set current timestamp as env variable
14+
run: echo "NOW=$(date -Iseconds)" >> $GITHUB_ENV
15+
- name: Submit empty dependency graph
16+
run: |
17+
curl -L \
18+
-X POST \
19+
-H "Accept: application/vnd.github+json" \
20+
-H "Authorization: Bearer ${{ github.token }}" \
21+
-H "X-GitHub-Api-Version: 2022-11-28" \
22+
https://api.github.com/repos/${{ github.repository }}/dependency-graph/snapshots \
23+
-d '{ "version" : 0, "job" : { "id" : "${{ github.run_id }}", "correlator" : "${{ inputs.job-correlator }} " }, "sha" : "${{ github.sha }}", "ref" : "${{ github.ref }}", "detector" : { "name" : "GitHub Dependency Graph Gradle Plugin", "version" : "0.0.3", "url" : "https://github.com/gradle/github-dependency-graph-gradle-plugin" }, "manifests" : {}, "scanned" : "${{ env.NOW }}" }'

0 commit comments

Comments
 (0)