From bedcf9e2f5fdcba9faa4a8b98f5567e8208aca5a Mon Sep 17 00:00:00 2001 From: Eric Deandrea Date: Fri, 6 Dec 2024 13:10:32 -0500 Subject: [PATCH] Check PR against solution branch --- .github/workflows/build-test.yml | 8 +++++++- .github/workflows/check-against-solution.yml | 15 +++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 901025b..2a271f5 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -50,8 +50,14 @@ jobs: run: ./mvnw -B clean verify -Dmaven.compiler.release=${{ matrix.java }} check-commit-against-solution-branch: - runs-on: ubuntu-latest if: (github.actor == 'dependabot[bot]') && (github.repository == 'RedHat-Middleware-Workshops/spring-jkube-external-config') && (github.event_name == 'pull_request') + strategy: + fail-fast: false + matrix: + java: + - '17' uses: RedHat-Middleware-Workshops/spring-jkube-external-config/.github/workflows/check-against-solution.yml@main + secrets: inherit with: + java_version: ${{ matrix.java }} ref: ${{ github.ref }} \ No newline at end of file diff --git a/.github/workflows/check-against-solution.yml b/.github/workflows/check-against-solution.yml index d1c01cb..453b796 100644 --- a/.github/workflows/check-against-solution.yml +++ b/.github/workflows/check-against-solution.yml @@ -21,12 +21,7 @@ jobs: check-commit-against-solution-branch: runs-on: ubuntu-latest if: github.repository == 'RedHat-Middleware-Workshops/spring-jkube-external-config' - strategy: - fail-fast: false - matrix: - java: - - '17' - name: "check-commit-against-solution-branch-${{ matrix.java }}" + name: "check-commit-against-solution-branch-${{ inputs.java_version }}" steps: - uses: actions/checkout@v4 ref: solution @@ -37,12 +32,12 @@ jobs: - name: Show diff run: git diff main - - name: Setup Java ${{ matrix.java }} + - name: Setup Java ${{ inputs.java_version }} uses: actions/setup-java@v4 with: - java-version: ${{ matrix.java }} + java-version: ${{ inputs.java_version }} distribution: temurin cache: maven - - name: Run build and tests with Java ${{ matrix.java }} - run: ./mvnw -B clean verify -Dmaven.compiler.release=${{ matrix.java }} \ No newline at end of file + - name: Run build and tests with Java ${{ inputs.java_version }} + run: ./mvnw -B clean verify -Dmaven.compiler.release=${{ inputs.java_version }} \ No newline at end of file