Bump org.owasp:dependency-check-maven from 11.1.1 to 12.0.0 #367
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: Application build and test | |
on: push | |
env: | |
java_version: '23' | |
mvn_parameter: '-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -ntp' | |
image_name: quay.io/heubeck/examiner | |
builder_image: quay.io/quarkus/ubi-quarkus-mandrel-builder-image | |
BUILDX_NO_DEFAULT_ATTESTATIONS: 1 | |
jobs: | |
ci: | |
strategy: | |
matrix: | |
include: | |
- arch: amd64 | |
builder_image_tag: 24.1.1.0-Final-java23-amd64 | |
- arch: arm64 | |
builder_image_tag: 24.1.1.0-Final-java23-arm64 | |
name: Application Build for ${{ matrix.arch }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '${{ env.java_version }}' | |
distribution: 'temurin' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/${{ matrix.arch }} | |
- name: Application Build and Test | |
env: | |
QUARKUS_CONTAINER_IMAGE_BUILD: 'true' | |
QUARKUS_CONTAINER_IMAGE_BUILDER: 'docker' | |
QUARKUS_NATIVE_CONTAINER_RUNTIME_OPTIONS: '--platform=linux/${{ matrix.arch }}' | |
QUARKUS_BUILDPACK_NATIVE_BUILDER_IMAGE: '${{ env.builder_image }}:${{ matrix.builder_image_tag }}' | |
QUARKUS_DOCKER_BUILDX_PLATFORM: 'linux/${{ matrix.arch }}' | |
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
run: | | |
skip_tests="" | |
# cannot exec arm binary during native tests on non-arm64 platform. | |
if [ "${{ matrix.arch }}" = "arm64" ]; then | |
skip_tests="-Dmaven.test.skip" | |
fi | |
mvn ${{ env.mvn_parameter }} $skip_tests clean verify -Pnative | |
VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout) | |
echo VERSION="$VERSION" >> $GITHUB_ENV | |
- name: Login to quay.io | |
uses: docker/login-action@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Docker build | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: src/main/docker/Dockerfile | |
platforms: linux/${{ matrix.arch }} | |
tags: | | |
${{ env.image_name }}:${{ env.VERSION }}-${{ matrix.arch }} | |
load: ${{ github.ref != 'refs/heads/main' }} | |
push: ${{ github.ref == 'refs/heads/main' }} | |
release: | |
runs-on: ubuntu-latest | |
needs: ci | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '${{ env.java_version }}' | |
distribution: 'temurin' | |
- name: Determine version | |
run: | | |
VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout) | |
echo VERSION="$VERSION" >> $GITHUB_ENV | |
- name: Login to quay.io | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build manifest for ${{ env.VERSION }} and latest | |
run: | | |
sha_amd64=$(podman manifest inspect "${image_name}:${VERSION}-amd64" | jq -r '.manifests[] | select (.platform.architecture == "amd64" and .platform.os == "linux") | .digest') | |
sha_arm64=$(podman manifest inspect "${image_name}:${VERSION}-arm64" | jq -r '.manifests[] | select (.platform.architecture == "arm64" and .platform.os == "linux") | .digest') | |
for v in ${VERSION} latest; do | |
echo "Creating manifest for ${image_name}:${v}" | |
podman manifest create "${image_name}:${v}" \ | |
"${image_name}@${sha_amd64}" \ | |
"${image_name}@${sha_arm64}" | |
podman manifest push "${image_name}:${v}" "docker://${image_name}:${v}" | |
done | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: v${{ env.VERSION }} |