Skip to content

Commit

Permalink
ci: clean dependency graph manually (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
ParanoidUser committed Jul 15, 2023
1 parent 7aecea8 commit 6bab050
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
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://github.com/gitapi/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 }}" }'

0 comments on commit 6bab050

Please sign in to comment.