From e8ce4cd6ef11fb77d0985ebc0861e47bbe65856c Mon Sep 17 00:00:00 2001 From: Jon Clucas Date: Tue, 28 Mar 2023 14:56:26 -0400 Subject: [PATCH] fixup! :construction_worker: Inspect all necessary stages --- .github/workflows/build_stages.yml | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_stages.yml b/.github/workflows/build_stages.yml index ed1f539c97..bf845561f9 100644 --- a/.github/workflows/build_stages.yml +++ b/.github/workflows/build_stages.yml @@ -51,7 +51,7 @@ jobs: name: Build C-PAC stage images for Ubuntu & FSL data strategy: matrix: - Dockerfile: ${{ inputs.phase_one }} + Dockerfile: ${{ fromJSON(inputs.phase_one) }} env: REBUILD: ${{ inputs.rebuild_phase_one }} runs-on: ubuntu-latest @@ -71,24 +71,24 @@ jobs: docker buildx imagetools inspect $DOCKER_TAG >/dev/null || echo "not_yet_exists=1" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT - name: Clear up some space on runner - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 run: | sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Set up Docker Buildx - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/setup-buildx-action@v2.2.1 - name: Log in to GitHub Container Registry - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/build-push-action@v3.2.0 with: file: .github/Dockerfiles/${{ matrix.Dockerfile }}.Dockerfile @@ -103,7 +103,7 @@ jobs: needs: Ubuntu strategy: matrix: - Dockerfile: ${{ inputs.phase_two }} + Dockerfile: ${{ fromJSON(inputs.phase_two) }} env: REBUILD: ${{ inputs.rebuild_phase_two }} runs-on: ubuntu-latest @@ -123,32 +123,32 @@ jobs: cat $GITHUB_OUTPUT if: always() - name: Prep Dockerfiles for forked repository - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 run: | .github/scripts/local_ghcr .github/Dockerfiles/${{ matrix.Dockerfile }}.Dockerfile ${{ github.repository_owner }} $DOCKER_TAG cat .github/Dockerfiles/${{ matrix.Dockerfile }}.Dockerfile - name: See Dockerfile - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 run: cat .github/Dockerfiles/${{ matrix.Dockerfile }}.Dockerfile - name: Clear up some space on runner - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 run: | sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Set up Docker Buildx - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/setup-buildx-action@v2.2.1 - name: Log in to GitHub Container Registry - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image - if: contains(env.REBUILD, matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.Dockerfile) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/build-push-action@v3.2.0 with: context: . @@ -168,7 +168,7 @@ jobs: REBUILD: ${{ inputs.rebuild_phase_three }} strategy: matrix: - variant: ${{ inputs.phase_three }} + variant: ${{ fromJSON(inputs.phase_three) }} steps: - name: Maximize build space uses: easimon/maximize-build-space@v4 @@ -198,32 +198,32 @@ jobs: id: docker_tag if: always() - name: Clear up some space on runner - if: contains(env.REBUILD, matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 run: | sudo rm -rf /usr/share/dotnet sudo rm -rf /opt/ghc sudo rm -rf "/usr/local/share/boost" sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Set up Docker Buildx - if: contains(env.REBUILD, matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/setup-buildx-action@v2.2.1 - name: Log in to GitHub Container Registry - if: contains(env.REBUILD, matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Prep Dockerfiles for forked repository - if: contains(env.REBUILD, matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 run: | .github/scripts/local_ghcr .github/Dockerfiles/base-${{ matrix.variant }}.Dockerfile ${{ github.repository_owner }} $DOCKER_TAG cat .github/Dockerfiles/base-${{ matrix.variant }}.Dockerfile - name: See Dockerfile - if: contains(env.REBUILD, matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 run: cat .github/Dockerfiles/base-${{ matrix.variant }}.Dockerfile - name: Build and push base image - if: contains(env.REBUILD, matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 + if: contains(fromJSON(env.REBUILD), matrix.variant) || steps.docker_tag.outputs.not_yet_exists == 1 uses: docker/build-push-action@v3.2.0 with: context: .