Skip to content

Commit

Permalink
Trivy - fix docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Dec 29, 2023
1 parent 1a71736 commit 5ee078d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1

- name: Get Version
id: getVersion
uses: ./backend

- name: Print the version
run: echo "The version we just got is ${{ steps.getVersion.outputs.version }}"

- name: Build image
uses: docker/build-push-action@v4
env:
GITHUB_SHA: ${{ github.sha }}
VERSION: NO_VERSION
VERSION: ${{ steps.getVersion.outputs.version }}
ENV_PROFILE: "prod"
with:
context: .
Expand Down
8 changes: 4 additions & 4 deletions infra/docker/app/DockerfileCI
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Multi stage build #
#####################

ARG GITHUB_SHA=NO_COMMIT
ARG VERSION=NO_VERSION
ARG GITHUB_SHA
ARG VERSION

########################################
# Build rapportnav backend with maven #
Expand All @@ -18,8 +18,8 @@ RUN mvn dependency:go-offline -B
# Stage 2: Build the application
FROM maven:3.8.5-openjdk-17-slim as build-backend

ARG GITHUB_SHA=NO_COMMIT
ARG VERSION=NO_VERSION
ARG GITHUB_SHA
ARG VERSION

WORKDIR /tmp/backend
COPY backend/ /tmp/backend
Expand Down

0 comments on commit 5ee078d

Please sign in to comment.