From 6a9ff4e65606d9efe7c5989c92078dca93d22577 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 20 Dec 2024 23:52:37 -0800 Subject: [PATCH] workflows/build-ci-container: Make sure to only test local containers The container test is run before we create the :latest tag, so we should not try testing this. --- .github/workflows/build-ci-container.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ci-container.yml b/.github/workflows/build-ci-container.yml index 50729e0173506e..4fa0713b381ceb 100644 --- a/.github/workflows/build-ci-container.yml +++ b/.github/workflows/build-ci-container.yml @@ -59,8 +59,9 @@ jobs: - name: Test Container run: | - for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do - podman run --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include \nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello' + for image in ${{ steps.vars.outputs.container-name-tag }}; do + # Use --pull=never to ensure we are testing the just built image. + podman run --pull=never --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include \nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello' done push-ci-container: