Skip to content

Commit

Permalink
Switch tot he docker/build-push-action and pass the github token to f…
Browse files Browse the repository at this point in the history
…ix api exhaustion
  • Loading branch information
sarg3nt committed Oct 29, 2024
1 parent b91cbd8 commit 57006e3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Build an image from Dockerfile
run: |
docker build -t ghcr.io/sarg3nt/go-docker-container:${{ github.sha }} .
# - name: Build an image from Dockerfile
# run: |
# docker build -t ghcr.io/sarg3nt/go-docker-container:${{ github.sha }} .
- name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: .
push: false
tags: ${{ github.sha }}
secrets: ${{ secrets.GITHUB_TOKEN }}

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
Expand Down

0 comments on commit 57006e3

Please sign in to comment.