Skip to content

Commit

Permalink
Merge pull request #3204 from navikt/chore/gradle
Browse files Browse the repository at this point in the history
submit dependencies with gradle dependency-submission
  • Loading branch information
sondrele authored Feb 2, 2024
2 parents 785a50d + 01544b9 commit 35e1615
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/gradle-dependency-submission.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Gradle Dependency Submission

on:
push:
branches:
- main
paths:
- .github/workflows/gradle-dependency-submission.yaml
- build.gradle.kts
- settings.gradle.kts
- gradle.properties
- gradle/libs.versions.toml
- common/**
- mulighetsrommet-api/**
- mulighetsrommet-arena-adapter/**

permissions:
contents: write

jobs:
dependency-submission:
name: Submit dependency graph
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
7 changes: 0 additions & 7 deletions .github/workflows/mr-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
runs-on:
labels: ubuntu-latest-8-cores
permissions:
contents: write # Needed for `mikepenz/gradle-dependency-submission`
id-token: write # Needed for `nais/docker-build-push`
steps:
- name: Checkout
Expand All @@ -45,12 +44,6 @@ jobs:
uses: ./.github/actions/setup-backend
- name: Build with Gradle
run: ./gradlew :mulighetsrommet-api:build
- name: Submit Gradle dependencies
uses: mikepenz/gradle-dependency-submission@v1
if: github.ref_name == 'main'
with:
gradle-build-module: :mulighetsrommet-api
sub-module-mode: INDIVIDUAL
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-build-push
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/mr-arena-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
name: CI
runs-on: ubuntu-latest
permissions:
contents: write # Needed for `mikepenz/gradle-dependency-submission`
id-token: write # Needed for `nais/docker-build-push`
steps:
- name: Checkout
Expand All @@ -44,12 +43,6 @@ jobs:
uses: ./.github/actions/setup-backend
- name: Build with Gradle
run: ./gradlew :mulighetsrommet-arena-adapter:build
- name: Submit Gradle dependencies
uses: mikepenz/gradle-dependency-submission@v1
if: github.ref_name == 'main'
with:
gradle-build-module: :mulighetsrommet-arena-adapter
sub-module-mode: INDIVIDUAL
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-build-push
Expand Down

0 comments on commit 35e1615

Please sign in to comment.