diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 12b1ac98ac871..a4005d5b8dfa6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -931,7 +931,12 @@ jobs: docker compose -f ./docker-compose/docker-compose.yml down promote-images: - needs: [ check-permissions, tag, test-images, vm-compute-node-image ] + needs: > + ${{ fromJson( + (github.ref_name == 'main' || github.ref_name == 'release' || github.ref_name == 'release-proxy' || github.ref_name == 'release-compute' || github.ref_name == 'jcgruenhage/promote-images-while-test-images') + && '[ check-permissions, tag, test-images, vm-compute-node-image ]' + || '[ check-permissions, tag, vm-compute-node-image ]' + ) }} runs-on: ubuntu-22.04 permissions: