diff --git a/.github/workflows/gradle-dependency-submission.yaml b/.github/workflows/gradle-dependency-submission.yaml new file mode 100644 index 0000000000..71e6b87d08 --- /dev/null +++ b/.github/workflows/gradle-dependency-submission.yaml @@ -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 diff --git a/.github/workflows/mr-api.yaml b/.github/workflows/mr-api.yaml index 12cb85014d..bc71655c27 100644 --- a/.github/workflows/mr-api.yaml +++ b/.github/workflows/mr-api.yaml @@ -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 @@ -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 diff --git a/.github/workflows/mr-arena-adapter.yaml b/.github/workflows/mr-arena-adapter.yaml index c566c682f3..e357da1544 100644 --- a/.github/workflows/mr-arena-adapter.yaml +++ b/.github/workflows/mr-arena-adapter.yaml @@ -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 @@ -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