Bump surefire-plugin.version from 3.4.0 to 3.5.0 in /backend #22
This file contains 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 and test backend | |
on: | |
push: | |
paths: | |
- backend/** | |
- .github/workflows/backend.yml | |
branches: [ '**' ] | |
tags: [ 'verein-*.*.*' ] | |
env: | |
BASE_IMAGE_NAME: ghcr.io/hopps-app/hopps/vereine | |
# prefix which needs to be in front of version tags | |
VERSION_TAG_PREFIX: 'verein-' | |
# permissions: | |
# contents: read | |
# packages: write | |
jobs: | |
build-code-and-container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: mvn package | |
run: mvn -B package --file backend/pom.xml | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.BASE_IMAGE_NAME }} | |
tags: | | |
# increasing run number tag on main | |
type=raw,value=${{ github.run_number }},enable={{is_default_branch}} | |
# for version tags (only works for tags) | |
type=match,pattern=${{ env.VERSION_TAG_PREFIX }}\d.\d.\d | |
# for containers on feature branches | |
type=ref,event=branch,enable=${{ github.ref_name != github.event.repository.default_branch }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: backend/app.hopps.vereine | |
file: backend/app.hopps.vereine/src/main/docker/Dockerfile.jvm | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} # tags from the docker/metadata-action |