Skip to content

Merge pull request #861 from DependencyTrack/port-pr3070 #482

Merge pull request #861 from DependencyTrack/port-pr3070

Merge pull request #861 from DependencyTrack/port-pr3070 #482

Workflow file for this run

name: Publish Jar
on:
push:
branches: [ "main" ]
permissions: { }
jobs:
publish-container-image:
name: Publish Jar based Container Images
runs-on: ubuntu-latest
permissions:
packages: write # Required to push images to ghcr.io
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # tag=v3.13.0
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # tag=v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # tag=v3.0.0
with:
install: true
- name: Docker login
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # tag=v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push container images
run: |-
mvn clean install -DskipTests \
-Dquarkus.container-image.registry=ghcr.io \
-Dquarkus.container-image.group=${GITHUB_REPOSITORY_OWNER,,} \
-Dquarkus.container-image.additional-tags=snapshot \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64
e2e-test:
name: End-To-End Test
runs-on: ubuntu-latest
timeout-minutes: 15
needs:
# As e2e tests depend on the latest container images,
# only trigger them after building the images completed.
- publish-container-image
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Set up JDK 17
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # tag=v3.13.0
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Test
env:
OSSINDEX_USERNAME: ${{ secrets.OSSINDEX_USERNAME }}
OSSINDEX_TOKEN: ${{ secrets.OSSINDEX_TOKEN }}
run: mvn -pl e2e clean verify -Pe2e-all