@@ -285,6 +285,8 @@ jobs:
285285 NEXUS_PASSWORD : ${{ secrets.NEXUS_PASSWORD }}
286286 HELM_REPO : ${{ needs.select_helm_repo.outputs.helm_repository }}
287287 if : needs.select_helm_repo.outputs.helm_repository != 'skip'
288+ outputs :
289+ IMAGE_TAG : ${{ steps.printtag.outputs.IMAGE_TAG }}
288290 steps :
289291 - name : Install protoc
290292 run : |
@@ -310,8 +312,28 @@ jobs:
310312 if : ${{ github.event_name == 'pull_request' }}
311313 run : python/cargo_version.py -m pr${{ github.event.pull_request.number }}
312314
313- # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
314- # default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
315- # This is needed for the HELM_REPO variable.
315+ # Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
316+ # default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
317+ # This is needed for the HELM_REPO variable.
316318 - name : Publish Docker image and Helm chart
317319 run : make -e publish
320+ # Output the name of the published image to the Job output for later use
321+ - id : printtag
322+ name : Output image name and tag
323+ run : echo "IMAGE_TAG=$(make -e print-docker-tag)" >> $GITHUB_OUTPUT
324+ openshift_preflight :
325+ name : Run the OpenShift Preflight check on the published images
326+ needs :
327+ - package_and_publish
328+ runs-on : ubuntu-latest
329+ env :
330+ IMAGE_TAG : ${{ needs.package_and_publish.outputs.IMAGE_TAG }}
331+ steps :
332+ - name : Install preflight
333+ run : |
334+ wget https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/latest/download/preflight-linux-amd64
335+ chmod +x preflight-linux-amd64
336+ - name : Check container
337+ run : ./preflight-linux-amd64 check container "$IMAGE_TAG" > preflight.out
338+ - name : " Passed?"
339+ run : ' [ "$(./preflight-linux-amd64 check container "$IMAGE_TAG" | jq -r .passed)" == true ]'
0 commit comments