[maven-release-plugin] prepare release 2026.5.12 #119
Workflow file for this run
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: Publish Docker image | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| jobs: | |
| push_to_registry: | |
| name: Push Docker image to Docker Hub | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 25 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: 25 | |
| - name: Set up Maven | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: 25 | |
| cache: maven | |
| - name: Restore Maven cache | |
| uses: skjolber/maven-cache-github-action@v3.1.1 | |
| with: | |
| step: restore | |
| - name: Build JAR | |
| run: | | |
| mvn clean install -DskipTests | |
| mkdir -p compiled | |
| cp artcoded/target/api-backend.jar compiled/ | |
| working-directory: . | |
| - name: Save Maven cache | |
| uses: skjolber/maven-cache-github-action@v3.1.1 | |
| with: | |
| step: save | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: nbittich/api-backend | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile.github | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=nbittich/api-backend:buildcache | |
| cache-to: type=registry,ref=nbittich/api-backend:buildcache,mode=max |