Skip to content

fix: MAUTIC_VERSION arg #46

fix: MAUTIC_VERSION arg

fix: MAUTIC_VERSION arg #46

Workflow file for this run

name: PR Tests
permissions:
contents: read
on:
pull_request:
branches:
- main
paths:
- 'Dockerfile'
- 'common/**'
jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
image_type: [apache, fpm]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image and export locally (for SAST scan)
uses: docker/build-push-action@v6
with:
file: Dockerfile
tags: mautic-${{ matrix.image_type }}
load: true
platforms: linux/amd64
build-args: |
BASE_TAG=8.3-apache-bookworm
MAUTIC_VERSION=6.x-dev
FLAVOUR=${{ matrix.image_type }}
- name: Save image to tar file
run: docker save mautic-${{ matrix.image_type }} -o image.tar
- name: Upload image as artifact
uses: actions/upload-artifact@v4
with:
name: mautic-${{ matrix.image_type }}
path: image.tar
sast:
runs-on: ubuntu-latest
needs: docker-build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
scan-ref: '.'
sca:
runs-on: ubuntu-latest
needs: docker-build
strategy:
matrix:
image_type: [apache, fpm]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
name: mautic-${{ matrix.image_type }}
- name: Load Docker image
run: docker load -i image.tar
- name: Run Trivy
uses: aquasecurity/[email protected]
with:
image-ref: 'mautic-${{ matrix.image_type }}'
format: 'table'
severity: 'CRITICAL'
exit-code: '1'
ignore-unfixed: true # Won't fail if there isn't a fix to the CVE
trivyignores: .trivyignore