Skip to content

Commit

Permalink
Add trivy test to docker build action
Browse files Browse the repository at this point in the history
  • Loading branch information
bytesnz committed Oct 22, 2021
1 parent 036c17e commit 0bbb030
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
export VERSION=$(echo $GITHUB_REF | sed -re 's/^.*\/([0-9a-zA-Z._-]+)$/\1/')
test "$VERSION" != "$GITHUB_REF"
docker build --file docker/Dockerfile --tag $DOCKER_USER/armadietto:$VERSION .
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v cache:/root/.cache/ aquasec/trivy $DOCKER_USER/armadietto:$VERSION
docker login -u $DOCKER_USER -p $DOCKER_TOKEN
docker push $DOCKER_USER/armadietto:$VERSION
docker tag $DOCKER_USER/armadietto:$VERSION $DOCKER_USER/armadietto
Expand Down

0 comments on commit 0bbb030

Please sign in to comment.