Skip to content

action stabilisation #33

action stabilisation

action stabilisation #33

# This workflow is never used by any external repository.
# It is created solely for testing purposes when developing new actions.
# Feel free to change it however you want.
name: "Scan containers"
on:
workflow_call:
push:
paths:
- '.github/workflows/0-scan-containers.yaml'
- 'actions/docker/scan-docker-repo/**'
branches: [ 'v4-beta' ]
jobs:
plan:
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/docker/scan-docker-repo@v4-beta
id: plan
with:
mode: plan
report-name: "skipped-images"
registry: containers.pl-open.science
repository: milaboratories/pl-containers
concurrency: 20
- uses: actions/upload-artifact@v4
with:
name: scanning-plan
path: ${{ steps.plan.outputs.plan-dir }}
outputs:
plan-dir: ${{ steps.plan.outputs.plan-dir }}
plan-matrix: ${{ steps.plan.outputs.plan-matrix }}
run-test:
runs-on: ubuntu-latest
needs: plan
strategy:
matrix:
include: ${{ fromJSON(needs.plan.outputs.plan-matrix) }}
steps:
- name: Download plan
uses: actions/download-artifact@v4
with:
name: scanning-plan
path: "scan-chunks"
- shell: bash
run: |
sl=$((RANDOM % 10))
echo "Sleeping for ${sl} seconds to avoid limiting on trivy side"
sleep ${sl}
- uses: milaboratory/github-ci/actions/docker/scan-docker-repo@v4-beta
with:
mode: scan
report-name: "trivy-report-${{ matrix.plan-file }}"
tag-file: scan-chunks/${{ matrix.plan-file }}