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

Dependency submission CI #831

Merged
merged 8 commits into from
Aug 10, 2024
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,3 @@ jobs:
- name: Run test script checker/bin-devel/test-${{ matrix.script }}
shell: bash
run: ./checker/bin-devel/test-${{ matrix.script }}.sh

dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/[email protected]

20 changes: 20 additions & 0 deletions .github/workflows/dependency-download-and-submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See: https://github.com/gradle/actions/blob/main/docs/dependency-submission.md#usage-with-pull-requests-from-public-forked-repositories
name: Download and submit dependency graph

on:
workflow_run:
workflows: ['Generate and save dependency graph']
types: [completed]

permissions:
actions: read
contents: write

jobs:
submit-dependency-graph:
runs-on: ubuntu-latest
steps:
- name: Download and submit dependency graph
uses: gradle/actions/dependency-submission@v4
with:
dependency-graph: download-and-submit # Download saved dependency-graph and submit
24 changes: 24 additions & 0 deletions .github/workflows/dependency-generate-and-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See: https://github.com/gradle/actions/blob/main/docs/dependency-submission.md#usage-with-pull-requests-from-public-forked-repositories
name: Generate and save dependency graph

on:
pull_request:

permissions:
contents: read # 'write' permission is not available

jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v4
with:
dependency-graph: generate-and-upload
18 changes: 18 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See: https://github.com/gradle/actions/blob/main/docs/dependency-submission.md#usage-with-pull-requests-from-public-forked-repositories
name: Dependency review

on:
pull_request:

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Dependency review'
uses: actions/dependency-review-action@v4
with:
retry-on-snapshot-warnings: true
retry-on-snapshot-warnings-timeout: 600