Currently the audit step is building every architecture image, and then using the host platform to scan each image, the host platform is amd64, meaning we aren't using the native arm, or arm64 scanner from trivy, to scan the the images.
This change ensures that for each audit job
we only build the latest-${ARCH} image if the DOCKER_TARGET_PLATFORM is set (it is set in the audits)
otherwise we build all images, and only scan the amd64 image on release.
Currently the audit step is building every architecture image, and then using the host platform to scan each image, the host platform is amd64, meaning we aren't using the native arm, or arm64 scanner from trivy, to scan the the images.
This change ensures that for each audit job
latest-${ARCH}
image if theDOCKER_TARGET_PLATFORM
is set (it is set in the audits)amd64
image on release.