container_scan:
  stage: security
  parallel:
    matrix:
      - IMAGE:
          - api
          - worker
        REGION:
          - eu
          - us
  script:
    - ./scripts/scan-image.sh "$IMAGE" "$REGION"
  artifacts:
    access: developer
    paths:
      - reports/${IMAGE}-${REGION}.json

publish_api_summary:
  stage: security
  needs:
    - job: container_scan
      parallel:
        matrix:
          - IMAGE: api
            REGION: eu
          - IMAGE: api
            REGION: us
  script:
    - ./scripts/publish-summary.sh
