diff --git a/.github/workflows/container_builds_weekly.yml b/.github/workflows/container_builds_weekly.yml index 4ee21e857..99428c08c 100644 --- a/.github/workflows/container_builds_weekly.yml +++ b/.github/workflows/container_builds_weekly.yml @@ -93,12 +93,24 @@ jobs: key: buildx-cache-${{ matrix.system }}${{ matrix.type }}-${{ matrix.arch }}-${{ github.sha }} restore-keys: buildx-cache-${{ matrix.system }}${{ matrix.type }}-${{ matrix.arch }}- + - name: Create docker file + if: env.BUILD_NEW_IMAGE == 'true' + run: | + DOCKERFILE=docker_build_wheel/Dockerfile-${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }} + mkdir -p docker_build_wheel + bash .github/docker/gen_dockerfile.sh ${{ matrix.system }} ${{ matrix.type }} ${{ matrix.arch }} "${{ matrix.py_minors }}" \ + > ${DOCKERFILE} + + - name: Create file with SHA hashes + run: | + SHA_FILENAME=${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }}:latest.sha.txt + sha256sum ${DOCKERFILE} > ${SHA_FILENAME} + - name: Check 'latest' parent image SHA run: | IMAGE=quay.io/pypa/${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }}:latest - SHA_FILENAME=${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }}:latest.sha.txt docker pull ${IMAGE} - docker images --no-trunc --quiet ${IMAGE} > ${SHA_FILENAME} + docker images --no-trunc --quiet ${IMAGE} >> ${SHA_FILENAME} CACHE_DIR=.buildx-cache-${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }} if [ -f "${CACHE_DIR}/${SHA_FILENAME}" ] && [ "$( cat ${SHA_FILENAME} )" == "$( cat ${CACHE_DIR}/${SHA_FILENAME} )" ]; then @@ -107,13 +119,6 @@ jobs: echo "BUILD_NEW_IMAGE=true" >> $GITHUB_ENV fi - - name: Create docker file - if: env.BUILD_NEW_IMAGE == 'true' - run: | - mkdir -p docker_build_wheel - bash .github/docker/gen_dockerfile.sh ${{ matrix.system }} ${{ matrix.type }} ${{ matrix.arch }} "${{ matrix.py_minors }}" \ - > docker_build_wheel/Dockerfile-${{ matrix.system }}${{ matrix.type }}_${{ matrix.arch }} - - name: Login to GitHub Container Registry if: env.BUILD_NEW_IMAGE == 'true' uses: docker/login-action@v3