Skip to content

Compile another repo with maven as part of workflow #25945

Answered by NicoNBW
nadavinvesting asked this question in Actions
Discussion options

You must be logged in to vote

Hi @nadavinvesting
Yes, you can use GitHub Action to achieve this. Detail steps:

1 Use pull request GitHub event that triggers the dev repo workflow. Such as:

on:
  pull_request:

If you have multiple dev repos, you need to set this workflow for each repos.

2 Check out the additional Maven project to a custom working directory by using Checkout V2 action. Such as:

    - name: checkout Maven project
      uses: actions/checkout@v2
      with:
        repository: NicoNBW/mavenProject
        path: my-maven-Project 

If you want to checkout the different repository that is private you will need to provide your own PAT.

3 Switch to this working directory and run the maven compile test command…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants