Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions .github/workflows/mend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,33 @@ name: Mend CLI Scan

on:
workflow_dispatch:
inputs:
image:
description: 'Image to scan'
required: true
default: 'docker.io/vespaengine/vespa:8'

env:
IMAGE: ${{ inputs.image }}
pull_request:
branches: [master]
push:
branches: [master]

jobs:
mend:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
image:
- 'docker.io/vespaengine/vespa:8'
- 'docker.io/vespaengine/vespa-build-almalinux-8:latest'
- 'docker.io/vespaengine/vespa-dev-almalinux-8:latest'
- 'docker.io/vespaengine/vespa-build-almalinux-9:latest'
- 'docker.io/vespaengine/vespa-dev-almalinux-9:latest'

steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
large-packages: false
docker-images: false
swap-storage: false

- name: Downloading Mend CLI
run: |
echo Downloading Mend CLI
Expand All @@ -26,5 +39,16 @@ jobs:
MEND_EMAIL: ${{secrets.MEND_EMAIL}}
MEND_USER_KEY: ${{secrets.MEND_USER_KEY}}
MEND_URL: https://saas-eu.mend.io
IMAGE: ${{ matrix.image }}
run: |
mend image "$IMAGE"
echo "Scanning image ${IMAGE}"

# Project is everything after the last slash (typically: vespa...:8)
MEND_PROJECT=${IMAGE##*/}
echo "Project: ${MEND_PROJECT}"

# Application is everything before the last slash (typically: docker.io/vespaengine)
MEND_APPLICATION=${IMAGE%/*}
echo "Application: ${MEND_APPLICATION}"

mend image "${IMAGE}" --scope "Vespa.ai//${MEND_APPLICATION}//${MEND_PROJECT}"