Concurrency example #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Main Pull Request | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: # row matrix only! | |
| java-version: [ 17 ] | |
| distribution: [ 'temurin' ] | |
| java-compiler-version: [ 17 ] | |
| java-source-version: [ 9 ] | |
| permissions: | |
| contents: read | |
| packages: read | |
| pages: read | |
| steps: | |
| - name: Checkout Main Project | |
| uses: actions/checkout@v4 | |
| with: | |
| path: main-project | |
| - name: Set up Java ${{ matrix.java-version }} with ${{ matrix.distribution }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: ${{ matrix.distribution }} | |
| server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
| settings-path: ${{ github.workspace }} # location for the settings.xml file | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Build with Gradle with java source ${{ matrix.java-source-version }} | |
| working-directory: main-project | |
| run: ./gradlew build | |
| env: | |
| PROJECT_WORKFLOW: 'main-pull-request' | |
| KIT_JAVA_COMPILER_VERSION: ${{ matrix.java-compiler-version }} | |
| KIT_JAVA_SOURCE_VERSION: ${{ matrix.java-source-version }} |