Added action to clear deps for a correlator
This commit is contained in:
		
							parent
							
								
									437bff62b6
								
							
						
					
					
						commit
						33f9bc031c
					
				
							
								
								
									
										24
									
								
								actions/clear-dependency-graph/action.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								actions/clear-dependency-graph/action.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | |||||||
|  | name: 'Clear dependency graph for a correlator' | ||||||
|  | 
 | ||||||
|  | inputs: | ||||||
|  |   job-correlator: | ||||||
|  |     required: true | ||||||
|  | 
 | ||||||
|  | runs: | ||||||
|  |   using: "composite" | ||||||
|  |   steps: | ||||||
|  |   - name: Set current timestamp as env variable | ||||||
|  |     shell: bash | ||||||
|  |     run: echo "NOW=$(date -Iseconds)" >> $GITHUB_ENV | ||||||
|  |   - name: Submit empty dependency graph | ||||||
|  |     shell: bash | ||||||
|  |     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 }}" }' | ||||||
|  |   - run: echo "::notice ::Cleared dependency graph for job correlator '${{ inputs.job-correlator }}'" | ||||||
|  |     shell: bash | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user