Update actions

This commit is contained in:
mjanez 2023-09-27 17:37:35 +02:00
parent 21b0902959
commit 83ecd027d2
2 changed files with 8 additions and 8 deletions

View File

@ -48,8 +48,8 @@ jobs:
push: true push: true
tags: ${{ env.TAG }} tags: ${{ env.TAG }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
context: ${{ env.CONTEXT }} context: ./ckan
file: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}/${{ env.DOCKERFILE }} file: ./ckan/Dockerfile
- name: Linting Dockerfile with hadolint in GH Actions - name: Linting Dockerfile with hadolint in GH Actions
uses: hadolint/hadolint-action@v3.1.0 uses: hadolint/hadolint-action@v3.1.0
@ -59,7 +59,7 @@ jobs:
- name: Run Trivy container image vulnerability scanner - name: Run Trivy container image vulnerability scanner
uses: aquasecurity/trivy-action@0.12.0 uses: aquasecurity/trivy-action@0.12.0
with: with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH }} image-ref: ${{ steps.meta.outputs.tags }}
format: sarif format: sarif
output: trivy-results.sarif output: trivy-results.sarif

View File

@ -14,7 +14,7 @@ env:
CONTEXT: . CONTEXT: .
BRANCH: ${{ github.head_ref }} BRANCH: ${{ github.head_ref }}
DOCKERFILE_PATH: /ckan DOCKERFILE_PATH: /ckan
DOCKERFILE: Dockerfile DOCKERFILE: Dockerfile.ghcr
HADOLINT_VERSION: 2.12.0 HADOLINT_VERSION: 2.12.0
jobs: jobs:
@ -83,16 +83,16 @@ jobs:
id: docker-push id: docker-push
with: with:
push: false push: false
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test-build-only tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
context: ./ckan context: ./ckan
file: ./ckan/Dockerfile file: ./ckan/Dockerfile.ghcr
- name: Linting Dockerfile and annotate code inline in the github PR viewer - name: Linting Dockerfile and annotate code inline in the github PR viewer
id: hadolint id: hadolint
uses: jbergstroem/hadolint-gh-action@v1.11.0 uses: jbergstroem/hadolint-gh-action@v1.11.0
with: with:
dockerfile: ./ckan/Dockerfile dockerfile: ./ckan/Dockerfile.ghcr
version: ${{ env.HADOLINT_VERSION }} version: ${{ env.HADOLINT_VERSION }}
annotate: true annotate: true
error_level: -1 error_level: -1
@ -100,7 +100,7 @@ jobs:
- name: Run Trivy container image vulnerability scanner - name: Run Trivy container image vulnerability scanner
uses: aquasecurity/trivy-action@0.12.0 uses: aquasecurity/trivy-action@0.12.0
with: with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test-build-only image-ref: ${{ steps.meta.outputs.tags }}
format: sarif format: sarif
output: trivy-results.sarif output: trivy-results.sarif