Skip to content

Commit

Permalink
Prøve med dockerhub i stedet...
Browse files Browse the repository at this point in the history
  • Loading branch information
arnfinn committed Oct 7, 2024
1 parent 0b13687 commit 14db18b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ jobs:
- name: Log in to the Container registry 📦
uses: docker/[email protected]
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Prepare tags
Expand All @@ -51,7 +50,7 @@ jobs:
context: ./${{ matrix.config.name }}/.
file: ./${{ matrix.config.name }}/Dockerfile
push: true
tags: ${{ env.GITHUB_REGISTRY }}/${{ steps.docker_meta.outputs.tags }}
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -73,12 +72,6 @@ jobs:
name: ${{ matrix.config.name }}
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry 📦
uses: docker/[email protected]
with:
registry: ${{ env.GITHUB_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Prepare tags
id: docker_meta
uses: docker/[email protected]
Expand All @@ -95,7 +88,7 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ env.GITHUB_REGISTRY }}/${{ steps.docker_meta.outputs.tags }}
image: ${{ steps.docker_meta.outputs.tags }}
args: --file=${{ matrix.config.name }}/Dockerfile --severity-threshold=critical --sarif-file-output=snyk.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
Expand All @@ -108,13 +101,13 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
image: ${{ env.GITHUB_REGISTRY }}/${{ steps.docker_meta.outputs.tags }}
image: ${{ steps.docker_meta.outputs.tags }}
args: --file=${{ matrix.config.name }}/Dockerfile --severity-threshold=critical --org=b034af62-43be-40c7-95e8-fdc56d6f3092
- name: Accept only vulnerability levels below critical
continue-on-error: false
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ env.GITHUB_REGISTRY }}/${{ steps.docker_meta.outputs.tags }}
image: ${{ steps.docker_meta.outputs.tags }}
args: --file=${{ matrix.config.name }}/Dockerfile --severity-threshold=critical

0 comments on commit 14db18b

Please sign in to comment.