From 7ed236e17e04763e6547430e29c9bd152dc12827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JC=20Gr=C3=BCnhage?= Date: Thu, 27 Feb 2025 17:16:14 +0100 Subject: [PATCH] fix(ci): push prod container images again (#11020) ## Problem /~https://github.com/neondatabase/neon/pull/10841 made building compute and neon images optional on releases that don't need them. The `push--image-prod` jobs had transitive dependencies that were skipped due to that, causing the images not to be pushed to production registries. ## Summary of changes Add `!failure() && !cancelled() &&` to the beginning of the conditions for these jobs to ensure they run even if some of their transitive dependencies are skipped. --- .github/workflows/build_and_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 0dcf11d32fc7..639c258c5cd3 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -906,7 +906,8 @@ jobs: push-neon-image-prod: needs: [ meta, generate-image-maps, neon-image, test-images ] - if: ${{ contains(fromJSON('["storage-release", "proxy-release"]'), needs.meta.outputs.run-kind) }} + # Depends on jobs that can get skipped + if: ${{ !failure() && !cancelled() && contains(fromJSON('["storage-release", "proxy-release"]'), needs.meta.outputs.run-kind) }} uses: ./.github/workflows/_push-to-container-registry.yml permissions: id-token: write # Required for aws/azure login @@ -924,7 +925,8 @@ jobs: push-compute-image-prod: needs: [ meta, generate-image-maps, vm-compute-node-image, test-images ] - if: ${{ needs.meta.outputs.run-kind == 'compute-release' }} + # Depends on jobs that can get skipped + if: ${{ !failure() && !cancelled() && needs.meta.outputs.run-kind == 'compute-release' }} uses: ./.github/workflows/_push-to-container-registry.yml permissions: id-token: write # Required for aws/azure login