Skip to content

Fix CVE

Fix CVE #45

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Integration Tests with Maven
run: mvn failsafe:integration-test -Pit-tests --file pom.xml
- name: Submit Dependency Snapshot
uses: advanced-security/maven-dependency-submission-action@v3
with:
ignore-maven-wrapper: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set VERSION environment variable
run: |
echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Docker Build-Tag-Push my-app
run: |
mvn spring-boot:build-image -DskipTests
docker tag xds-registry-to-fhir:${{ env.VERSION }} ${{ secrets.DOCKERHUB_USERNAME }}/xds-registry-to-fhir:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/xds-registry-to-fhir:latest