Skip to content

Check PR against solution branch #273

Check PR against solution branch

Check PR against solution branch #273

Workflow file for this run

name: Build and test
on:
workflow_call:
push:
paths-ignore:
- '.github/dependabot.yml'
- '*.md'
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- '*.md'
- '.github/dependabot.yml'
branches:
- main
workflow_dispatch:
concurrency:
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
simple-build-test:
runs-on: ubuntu-latest
needs: check-commit-against-solution-branch
if: always() && !failure() && !cancelled() && (github.repository == 'RedHat-Middleware-Workshops/spring-jkube-external-config')
strategy:
fail-fast: false
matrix:
java:
- '17'
name: "build-test-java-${{ matrix.java }}"
steps:
- uses: actions/checkout@v4
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- name: Run build and tests with Java ${{ matrix.java }}
run: ./mvnw -B clean verify -Dmaven.compiler.release=${{ matrix.java }}
check-commit-against-solution-branch:
if: (github.event_name == 'pull_request') && (github.repository == 'RedHat-Middleware-Workshops/spring-jkube-external-config') && ((github.actor == 'dependabot[bot]') || (github.event.pull_request.user.login == 'dependabot[bot]'))
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 }}
pr_num: ${{ github.event.pull_request.number }}
pr_head_ref: ${{ github.head_ref }}