-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ env: | |
jobs: | ||
build_docker_image: | ||
name: Build docker image | ||
timeout-minutes: 30 | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
|
@@ -31,16 +31,18 @@ jobs: | |
- name: Build docker image | ||
run: docker build . --file Dockerfile --tag $IMAGE_NAME | ||
|
||
- name: Log in to registry | ||
- name: Log in to gHRC | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Push image | ||
run: docker push ghcr.io/${{ github.repository_owner }}/cpf/$IMAGE_NAME:$VERSION | ||
run: | | ||
docker tag $IMAGE_NAME ghcr.io/tivix/cpf/$IMAGE_NAME:$VERSION | ||
docker push ghcr.io/tivix/cpf/$IMAGE_NAME:$VERSION | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: "ghcr.io/${{ github.repository_owner }}/cpf/$IMAGE_NAME:$VERSION" | ||
image-ref: "ghcr.io/tivix/cpf/${{ env.IMAGE_NAME }}:${{ env.VERSION }}" | ||
scanners: "vuln,secret,config" | ||
format: "sarif" | ||
output: "trivy-fe-results.sarif" | ||
|