Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up dependency graph manually #386

Merged
merged 5 commits into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ jobs:
VERSION: 1.17.0
with:
gradle-home-cache-cleanup: true
dependency-graph: generate-and-submit
# https://github.com/gradle/gradle-build-action/issues/791
# dependency-graph: generate-and-submit
arguments: |
sonar -x compileJava -x compileTestJava
--no-daemon
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/clean-dependency-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Clear dependency graph for a correlator

on:
workflow_dispatch:
inputs:
job-correlator:
description: Key that is used to group snapshots submitted over time

jobs:
clean-up:
runs-on: ubuntu-22.04
steps:
- name: Set current timestamp as env variable
run: echo "NOW=$(date -Iseconds)" >> $GITHUB_ENV
- name: Submit empty dependency graph
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/dependency-graph/snapshots \
-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 }}" }'