Skip to content

Bump com.github.spotbugs from 6.0.9 to 6.0.12 #806

Bump com.github.spotbugs from 6.0.9 to 6.0.12

Bump com.github.spotbugs from 6.0.9 to 6.0.12 #806

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
env:
JAVA_VERSION: 21
JAVA_DISTRO: temurin
DOCKER_HUB_IMAGE_NAME: marcelcoding/luna
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
- name: Lint with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: checkstyleMain checkstyleTest spotbugsMain spotbugsTest pmdMain pmdTest --stacktrace --no-daemon
#- name: Annotate Checkstyle Issues
# uses: jwgmeligmeyling/checkstyle-github-action@master
# with:
# path: '**/build/reports/checkstyle/*.xml'
#- name: Annotate SpotBugs Issues
# uses: jwgmeligmeyling/spotbugs-github-action@master
# with:
# path: '**/build/reports/spotbugs/*.xml'
#- name: Annotate PMD Issues
# uses: jwgmeligmeyling/pmd-github-action@master
# with:
# path: '**/build/reports/pmd/*.xml'
test:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 21 ]
java-distro: [ temurin ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distro }}
- name: Run tests with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: test --stacktrace --no-daemon
build:
needs: [ lint, test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: :luna-main:shadowJar :luna-main:assemble --stacktrace --no-daemon
- uses: actions/upload-artifact@v4
with:
name: luna
path: luna-main/build/libs
docker:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
# strategy:
# matrix:
# jvm-impl: [ hotspot, openj9 ]
# include:
# - jvm-impl: hotspot
# platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
# - jvm-impl: openj9
# platforms: linux/amd64 #,linux/arm64/v8
steps:
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.DOCKER_HUB_IMAGE_NAME }}
ghcr.io/${{ github.repository }}
tags: |
type=edge
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: docker/setup-qemu-action@v3
if: matrix.platforms != 'linux/amd64'
- uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.jvm-impl }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.jvm-impl }}-
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: actions/download-artifact@v4
with:
name: luna
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.github-actions
platforms: linux/amd64,linux/arm64/v8 #${{ matrix.platforms }} linux/arm/v7,
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
JVM_VERSION=${{ env.JAVA_VERSION }}
# JVM_IMPL=${{ matrix.jvm-impl }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache