Skip to content

Commit

Permalink
Update Trivy (#6)
Browse files Browse the repository at this point in the history
* test trivy

* no branch

* Add if for GHA

* check trivy
  • Loading branch information
pperzyna authored Aug 11, 2021
1 parent 1d4dd52 commit e3b1a93
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
tags: |
type=raw,value=latest
type=semver,prefix=v,pattern={{version}}
type=semver,prefix=v,pattern={{major}}
type=semver,prefix=v,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=semver,prefix=v,pattern={{major}}.{{minor}}
- name: Container - Build & Push
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ jobs:

- name: Container - Scan - Upload results
uses: github/codeql-action/upload-sarif@v1
if: ${{ failure() }} && github.event_name == 'schedule'
if: ${{ failure() && github.event_name == 'schedule' && github.ref == 'refs/heads/main' }}
with:
sarif_file: "trivy-results.sarif"

- name: Jira Login
if: ${{ failure() }} && github.event_name == 'schedule'
if: ${{ failure() && github.event_name == 'schedule' && github.ref == 'refs/heads/main' }}
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Jira Issue
if: ${{ failure() }} && github.event_name == 'schedule'
if: ${{ failure() && github.event_name == 'schedule' && github.ref == 'refs/heads/main' }}
uses: atlassian/gajira-create@master
with:
project: ${{ secrets.JIRA_TRIVY_PROJECT }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
trivy-results.sarif
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM adoptopenjdk/openjdk11:jre-11.0.11_9-alpine@sha256:c069efc08cd8898458087ced
WORKDIR /opt/docker/bin
EXPOSE 9000

RUN apk --update-cache upgrade;\
RUN apk --update-cache upgrade; \
apk add bash; \
rm -rf /var/cache/apk/*

Expand Down

0 comments on commit e3b1a93

Please sign in to comment.