Skip to content

Commit 1b5deae

Browse files
authored
workflows/build-ci-container: Make sure to only test local containers (#120827)
The container test is run before we create the :latest tag, so we should not try testing this, otherwise it will pull the :latest tag from the github registry, and won't test the container we just built.
1 parent 9165848 commit 1b5deae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/build-ci-container.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ jobs:
5959

6060
- name: Test Container
6161
run: |
62-
for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do
63-
podman run --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
62+
for image in ${{ steps.vars.outputs.container-name-tag }}; do
63+
# Use --pull=never to ensure we are testing the just built image.
64+
podman run --pull=never --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
6465
done
6566
6667
push-ci-container:

0 commit comments

Comments
 (0)