Compare commits

...

2 Commits

Author SHA1 Message Date
Jan Wagner
9b0a84a36f Also use github.actor for the scan workfow 2021-12-08 21:25:40 +01:00
Jan Wagner
70560d7d48 Use github.actor to detect the username for ghcr.io upload 2021-12-08 21:25:35 +01:00
2 changed files with 7 additions and 7 deletions

View File

@ -19,9 +19,9 @@ jobs:
- name: Build an image from Dockerfile
run: |
docker build \
-t ghcr.io/hoellen/nextcloud \
-t ghcr.io/hoellen/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c6) \
-t ghcr.io/hoellen/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2) \
-t ghcr.io/${{ github.actor }}/nextcloud \
-t ghcr.io/${{ github.actor }}/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c6) \
-t ghcr.io/${{ github.actor }}/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2) \
.
- name: Run Trivy vulnerability scanner
@ -46,6 +46,6 @@ jobs:
- name: Push image to GitHub
run: |
docker push ghcr.io/hoellen/nextcloud
docker push ghcr.io/hoellen/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c6)
docker push ghcr.io/hoellen/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2)
docker push ghcr.io/${{ github.actor }}/nextcloud
docker push ghcr.io/${{ github.actor }}/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c6)
docker push ghcr.io/${{ github.actor }}/nextcloud:$(grep -oP '(?<=NEXTCLOUD_VERSION=).*' Dockerfile | head -c2)

View File

@ -16,7 +16,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ghcr.io/hoellen/nextcloud'
image-ref: 'ghcr.io/${{ github.actor }}/nextcloud'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'