Skip to content

Commit

Permalink
Add a step to integrate the PR into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
mumrah committed Sep 30, 2024
1 parent 9cb4909 commit 9434435
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,32 @@ jobs:
env:
GITHUB_WORKSPACE: ${{ github.workspace }}

integrate:
if: is-public-fork
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 21, 17, 11, 8 ]
name: Integrate with trunk, compile, and check Java ${{ matrix.java }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Gradle
uses: ./.github/actions/setup-gradle
with:
java-version: ${{ matrix.java }}
gradle-cache-read-only: true
gradle-cache-write-only: false
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
- name: Merge, Compile, and validate
run: |
git checkout -b trunk-integration-${{ github.run_id }} trunk
git merge --squash ${{ github.ref }} -m ''
./gradlew --build-cache --info --no-scan check -x test
test:
needs: validate
if: ${{ ! needs.validate.outputs.is-draft }}
Expand Down

0 comments on commit 9434435

Please sign in to comment.