Skip to content

Abstracted the public methods out of DirectoryApi #111

Abstracted the public methods out of DirectoryApi

Abstracted the public methods out of DirectoryApi #111

Workflow file for this run

name: Build with maven and docker
on:
push:
branches:
- master
- develop
tags:
- 'v[0-9]+.[0-9]+.[0-9]+**'
pull_request:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- name: Cache Local Maven Repo
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('pom.xml') }}
- name: Build with Maven
run: mvn -B install
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: docker-meta
uses: docker/metadata-action@v4
with:
images: |
samply/directory_sync_service
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,format=long
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: samply/directory_sync_service:sha-${{ github.sha }}
format: sarif
output: trivy-results.sarif
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: trivy-results.sarif