Skip to content

Refactored github jobs and added hadolint step #3

Refactored github jobs and added hadolint step

Refactored github jobs and added hadolint step #3

Workflow file for this run

name: build
on:
push:
branches:
- main
- dev
pull_request:
jobs:
redcap-fastcgi-client:
name: redcap-fastcgi-client
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint Dockerfile with Hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./fastcgi-client/Dockerfile
- name: Build container from Dockerfile
run: docker build -t ghcr.io/aphp/redcap-fastcgi-client:${{ github.sha }} ./fastcgi-client
- name: Scan container for vulnerabilities with Trivy
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'ghcr.io/aphp/redcap-fastcgi-client:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
redcap-httpd-shibd:
name: redcap-httpd-shibd
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint Dockerfile with Hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./httpd-shibd/Dockerfile
- name: Build container from Dockerfile
run: docker build -t ghcr.io/aphp/redcap-httpd-shibd:${{ github.sha }} ./httpd-shibd
- name: Scan container for vulnerabilities with Trivy
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'ghcr.io/aphp/redcap-httpd-shibd:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'
redcap-php-fpm:
name: redcap-php-fpm
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint Dockerfile with Hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ./php-fpm/Dockerfile
- name: Build container from Dockerfile
run: docker build -t ghcr.io/aphp/redcap-php-fpm:${{ github.sha }} ./php-fpm
- name: Scan container for vulnerabilities with Trivy
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'ghcr.io/aphp/redcap-php-fpm:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL'