Skip to content

IA-4823 Fix the env that was broken previously #483

IA-4823 Fix the env that was broken previously

IA-4823 Fix the env that was broken previously #483

Workflow file for this run

name: dsp-appsec-trivy
on: [pull_request]
jobs:
appsec-trivy:
# Parse Dockerfile and build, scan image if a "blessed" base image is not used
name: DSP AppSec Trivy check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- resourceValidator
- zombieMonitor
- janitor
steps:
- uses: actions/checkout@v2
# fetch SBT package
- uses: olafurpg/setup-scala@v10
# set up SBT cache
- uses: actions/cache@v2
with:
path: |
~/.cache
~/.coursier/cache
~/.ivy2/cache
~/.sbt
key: sbt-${{ matrix.project }}-${{ hashFiles('**/*.sbt') }}
restore-keys: |
sbt-${{ matrix.project }}-
sbt-
# build the image
- name: Build
id: build
run: |
set -o pipefail
# Avoid running into this issue https://www.reddit.com/r/azuredevops/comments/15kiovv/ado_docker_buildaspnet_70_issue_since_last_week/
export DOCKER_BUILDKIT=0
# build sources and store the log
sbt -no-colors ${{ matrix.project }}/docker:publishLocal | tee build.log
# export image name from the log
image=$(grep 'Successfully tagged' build.log | awk '{print $NF}')
echo "::set-output name=image::${image}"
# scan the image
- uses: broadinstitute/dsp-appsec-trivy-action@v1
with:
image: ${{ steps.build.outputs.image }}