From 3e5949197c0a0a738321234746ab8e742389444c Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Thu, 20 Nov 2025 13:42:48 +0100 Subject: build: publish preview image for testing --- .github/workflows/test.yml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d2ac4e..37ad568 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,4 +36,37 @@ jobs: uses: gradle/actions/setup-gradle@v3 - name: Execute integration tests - run: ./gradlew integrationTest \ No newline at end of file + run: ./gradlew integrationTest + + # Deploy preview build for testing based on latest successful tested master + deployPreview: + runs-on: ubuntu-latest + needs: + - tests + - integrationTests + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Execute image build and push + run: | + ./gradlew bootBuildImage + docker tag ghcr.io/${{ github.repository }} ghcr.io/${{ github.repository }}:preview + docker push ghcr.io/${{ github.repository }}:preview \ No newline at end of file -- cgit v1.2.3