summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2025-11-20 13:42:48 +0100
committerPaul-Christian Volkmer2025-11-20 13:42:48 +0100
commit3e5949197c0a0a738321234746ab8e742389444c (patch)
treed14a14fbc2460a4034f3208cbb983752026ad103 /.github
parentccf9ea4c801ef23aef6a4b4d8c1d9d5b5e63f9a2 (diff)
build: publish preview image for testing
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml35
1 files changed, 34 insertions, 1 deletions
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