summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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