fix(deps): update dependency org.springframework.boot:spring-boot-starter-parent to v4 #67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Maven Build | |
| on: | |
| push: | |
| branches: [ "main", "feature/*", "bugfix/*" ] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/ft-feature-service | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Setup QEMU (for arm emulation on amd64 runner) | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| # Setup Buildx | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Set up Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Make Maven wrapper executable | |
| run: chmod +x mvnw | |
| - name: Build with Maven | |
| run: ./mvnw -ntp verify | |
| - if: ${{ github.ref == 'refs/heads/main' }} | |
| name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # Build amd64 image | |
| - name: Build amd64 image | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| run: | | |
| ./mvnw spring-boot:build-image \ | |
| -DdockerImageName=docker.io/$DOCKER_IMAGE_NAME-amd64 \ | |
| -Dspring-boot.build-image.publish=true \ | |
| -Dspring-boot.build-image.imagePlatform=linux/amd64 -DskipTests=true | |
| # Build arm64 image | |
| - name: Build arm64 image | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| run: | | |
| ./mvnw spring-boot:build-image \ | |
| -DdockerImageName=docker.io/$DOCKER_IMAGE_NAME-arm64 \ | |
| -Dspring-boot.build-image.publish=true \ | |
| -Dspring-boot.build-image.imagePlatform=linux/arm64 -DskipTests=true | |
| # Merge them into multi-arch manifest | |
| - name: Create multi-arch manifest | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| run: | | |
| docker buildx imagetools create \ | |
| -t docker.io/$DOCKER_IMAGE_NAME:latest \ | |
| docker.io/$DOCKER_IMAGE_NAME-amd64 \ | |
| docker.io/$DOCKER_IMAGE_NAME-arm64 |