Build Docker Native Image #2
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: Build Docker Native Image | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Java | |
| id: setup_java | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25' | |
| distribution: 'graalvm' | |
| - name: Build Backend Application | |
| run: | | |
| chmod +x mvnw | |
| ./mvnw -B clean install -DskipTests | |
| ./mvnw -B package -pl sendium-app -Pnative -Dquarkus.native.container-build=false | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and Push Docker Image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: ./sendium-app | |
| file: ./sendium-app/src/main/docker/Dockerfile.native | |
| push: true | |
| tags: ${{ secrets.DOCKERHUB_USERNAME }}/sendium:latest-native |