Skip to content

Sonar: Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()' #3190

Sonar: Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()'

Sonar: Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()' #3190

name: Build and publish JVM-based images
on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
branches:
- main
jobs:
build_jvm_docker_image:
name: Build and publish the JVM-based Docker image
runs-on: ubuntu-22.04
env:
DOCKER_IMAGE_NAME: '${{ github.repository_owner }}/jhipster-lite'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.DOCKER_IMAGE_NAME }}
- name: Login to Docker Registry
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
uses: docker/login-action@v3.1.0
id: login-hub
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the JVM-based Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}