From f53783e0521b7c20be36029b0036fbbf29fc8f3a Mon Sep 17 00:00:00 2001
From: Oliver Drotbohm <odrotbohm@vmware.com>
Date: Thu, 16 Nov 2023 11:00:41 +0100
Subject: [PATCH] #2058 - Enable compatibility builds on all 2.x branches.

---
 .github/workflows/compatibility.yaml | 40 ++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 .github/workflows/compatibility.yaml

diff --git a/.github/workflows/compatibility.yaml b/.github/workflows/compatibility.yaml
new file mode 100644
index 000000000..6e8c32b35
--- /dev/null
+++ b/.github/workflows/compatibility.yaml
@@ -0,0 +1,40 @@
+name: Compatibility builds
+
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '5 6 * * *'
+branches:
+  - 'main'
+  - '2.1.x'
+  - '2.0.x'
+
+jobs:
+  compatibility:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        spring: ['', 'spring-next', 'spring-61-next']
+        kotlin: ['', 'kotlin-next', 'kotlin-2-next']
+        jackson: ['', 'jackson-next']
+
+    name: Compatibility ${{ matrix.spring }} ${{ matrix.kotlin }} ${{ matrix.jackson }}
+
+    steps:
+
+    - name: Check out sources
+      uses: actions/checkout@v3
+
+    - name: Set up JDK 17
+      uses: actions/setup-java@v3
+      with:
+        distribution: 'temurin'
+        java-version: 17
+        cache: 'maven'
+
+    - name: List dependencies
+      run: ./mvnw -D depedency:list -Dsort
+    - name: Build
+      run: ./mvnw -B verify -P${{ matrix.spring }},${{ matrix.kotlin }},${{ matrix.jackson }} --file pom.xml