From f866faf6298cc8fcb37e8bfaa8d4aed90ec12895 Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Mon, 25 Mar 2024 11:18:56 -0400 Subject: [PATCH] fix(ci): some logic reverting --- .github/workflows/reusable_dockerfile_pipeline.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_dockerfile_pipeline.yml b/.github/workflows/reusable_dockerfile_pipeline.yml index df2d3cf..c310c44 100644 --- a/.github/workflows/reusable_dockerfile_pipeline.yml +++ b/.github/workflows/reusable_dockerfile_pipeline.yml @@ -220,13 +220,15 @@ jobs: run: echo "run=${{ matrix.registry.run-on-pr == needs.prepare-env.outputs.build_for_pr || needs.prepare-env.outputs.build_for_merge == 'true'}}" >> "$GITHUB_OUTPUT" - name: Quit Early - if: ${{ steps.run_check.outputs.run == 'false'}} + if: ${{ steps.run_check.outputs.run == 'true'}} run: exit 0 - name: Checkout + if: ${{ steps.run_check.outputs.run == 'true'}} uses: "actions/checkout@v4" - name: Login to ${{ matrix.registry.name }} + if: ${{ steps.run_check.outputs.run == 'true'}} uses: docker/login-action@v3 with: registry: ${{ matrix.registry.registry-url }} @@ -234,6 +236,7 @@ jobs: password: ${{ secrets[matrix.registry.token-secret] }} - name: Extract Docker Metadata + if: ${{ steps.run_check.outputs.run == 'true'}} id: meta uses: docker/metadata-action@v5 env: @@ -257,9 +260,11 @@ jobs: # yamllint enable - name: Set up QEMU + if: ${{ steps.run_check.outputs.run == 'true'}} uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx + if: ${{ steps.run_check.outputs.run == 'true'}} uses: docker/setup-buildx-action@v3 # Build and Publish images on main, master, and versioned branches. @@ -269,7 +274,7 @@ jobs: # the amd64 image since building the arm64 image takes significantly # longer. - name: "Merge on Main Trigger: Build and Push All Docker Images" - if: ${{ needs.prepare-env.outputs.build_for_merge == 'true' }} + if: ${{ needs.prepare-env.outputs.build_for_merge == 'true' && steps.run_check.outputs.run == 'true'}} uses: docker/build-push-action@v5 env: OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }} @@ -289,7 +294,7 @@ jobs: # forks can't push, we still want to try and build the image to catch # bugs. For testing purposes we only need an amd64 image. - name: "Pull Request Trigger: Build and Push amd64 Docker Image" - if: ${{ needs.prepare-env.outputs.build_for_pr == 'true' }} + if: ${{ needs.prepare-env.outputs.build_for_pr == 'true' && steps.run_check.outputs.run == 'true'}} uses: docker/build-push-action@v5 env: OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}