Skip to content

Commit

Permalink
Split the submit dependency graph job (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Omico authored Apr 10, 2024
1 parent 391abd5 commit c5013b4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,11 @@ jobs:
gradle-build:
name: Gradle Build
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- gradle-wrapper-validation
env:
DEPENDENCY_GRAPH_EXCLUDE_PROJECTS: ':(gradm|initialization|project)'
needs: gradle-wrapper-validation
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 0

- uses: actions/setup-java@v4
with:
Expand All @@ -37,6 +32,13 @@ jobs:
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
dependency-graph: generate-and-submit

- run: ./gradlew build --no-daemon --stacktrace

gradle-submit-dependency-graph:
name: Gradle Submit Dependency Graph
uses: OmicoDev/gradle-project-initializer-template/.github/workflows/gradle-submit-dependency-graph.yml@main
if: ${{ github.ref == 'refs/heads/main' }}
needs: gradle-build
permissions:
contents: write
28 changes: 28 additions & 0 deletions .github/workflows/gradle-submit-dependency-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Gradle Submit Dependency Graph

on:
workflow_call:

permissions:
contents: write

jobs:
gradle-submit-dependency-graph:
runs-on: ubuntu-latest
env:
DEPENDENCY_GRAPH_EXCLUDE_PROJECTS: ':(gradm|initialization|project)'
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
dependency-graph: generate-and-submit

- run: ./gradlew build --no-daemon --stacktrace

0 comments on commit c5013b4

Please sign in to comment.