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

Does the dependency-submission action support a monorepo configuration? #379

Open
Toru-Takagi opened this issue Sep 11, 2024 · 1 comment
Labels
in:dependency-submission question Further information is requested

Comments

@Toru-Takagi
Copy link

My repository is structured as a monorepo and is organized as follows:

directory-name
  ┣ microservice-a
  ┃      ┣ build.gradle.kts
  ┃      ┣ gradle.properties
  ┃      ┣ gradlew
  ┃      ┗ settings.gradle.kts
  ┣ microservice-b
  ┃      ┣ build.gradle.kts
  ┃      ┣ gradle.properties
  ┃      ┣ gradlew
  ┃      ┗ settings.gradle.kts
  ┣ microservice-c
  ┃      ┗ go.mod
  ┣ microservice-d
  ┃      ┗ package.json
  ┗ microservice-e
           ┣ build.gradle.kts
           ┣ gradle.properties
           ┣ gradlew
           ┗ settings.gradle.kts

Here is the GitHub Actions configuration file.

name: Dependency Submission

on:
  push:
    branches: ["main"]

permissions:
  contents: write

jobs:
  dependency-submission:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: "temurin"
          java-version: "21"
      - name: Generate and submit dependency graph for microservice-a
        env:
          GITHUB_JOB_CORRELATOR: "${{ github.workflow }}-${{ github.job }}-microservice-a"
        uses: gradle/actions/dependency-submission@v4
        with:
          build-root-directory: "microservice-a"
      - name: Generate and submit dependency graph for microservice-b
        env:
          GITHUB_JOB_CORRELATOR: "${{ github.workflow }}-${{ github.job }}-microservice-b"
        uses: gradle/actions/dependency-submission@v4
        with:
          build-root-directory: "microservice-b"
      - name: Generate and submit dependency graph for microservice-c
        env:
          GITHUB_JOB_CORRELATOR: "${{ github.workflow }}-${{ github.job }}-microservice-c"
        uses: gradle/actions/dependency-submission@v4
        with:
          build-root-directory: "microservice-c"
@bigdaz
Copy link
Member

bigdaz commented Sep 11, 2024

Yes, this should work, but I'm not sure it's been extensively tested.
What is your experience with running this workflow?

Note that the GITHUB_JOB_CORRELATOR setting should not be necessary: the action will determine a unique job correlator per invocation.

@bigdaz bigdaz added question Further information is requested in:dependency-submission labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:dependency-submission question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants