This repository has been archived by the owner on Feb 21, 2025. It is now read-only.
generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic support for GitHub Dependency Graph (#782)
- Loading branch information
Showing
25 changed files
with
47,933 additions
and
29,948 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Test execution with caching | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache-key-prefix: | ||
type: string | ||
runner-os: | ||
type: string | ||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' | ||
download-dist: | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
DOWNLOAD_DIST: ${{ inputs.download-dist }} | ||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }} | ||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true | ||
|
||
jobs: | ||
groovy-generate: | ||
strategy: | ||
matrix: | ||
os: ${{fromJSON(inputs.runner-os)}} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Download distribution if required | ||
uses: ./.github/actions/download-dist | ||
- name: Setup Gradle for dependency-graph generate | ||
uses: ./ | ||
with: | ||
dependency-graph: generate | ||
- name: Run gradle build | ||
run: ./gradlew build | ||
working-directory: .github/workflow-samples/groovy-dsl | ||
|
||
kotlin-generate: | ||
strategy: | ||
matrix: | ||
os: ${{fromJSON(inputs.runner-os)}} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Download distribution if required | ||
uses: ./.github/actions/download-dist | ||
- name: Setup Gradle for dependency-graph generate | ||
uses: ./ | ||
with: | ||
dependency-graph: generate-and-submit | ||
- name: Run gradle build | ||
run: ./gradlew build | ||
working-directory: .github/workflow-samples/kotlin-dsl | ||
|
||
submit: | ||
needs: [groovy-generate, kotlin-generate] | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Download distribution if required | ||
uses: ./.github/actions/download-dist | ||
- name: Submit dependency graphs | ||
uses: ./ | ||
with: | ||
dependency-graph: download-and-submit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.