From 5a4b32fd9acbe9331278bd012c25952cdd1a262c Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 16 Sep 2023 21:06:05 +0200 Subject: [PATCH 1/2] re-enable container multi-arch builds --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dadf30d..41f91d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,6 +163,7 @@ jobs: while IFS='' read -r line; do tags+=(-t "${line}"); done < <(echo "${DOCKER_METADATA_OUTPUT_JSON}" | jq -r '.tags[]') && docker build "${tags[@]}" --file linux/${{ matrix.distro }}/Dockerfile + --platform ${{ matrix.platforms }} --cache-from ${{ format('type=registry,ref={0}:{1}', env.REGISTRY_IMAGE, matrix.from-version) }} --cache-from ${{ format('type=registry,ref={0}:cache-{1}', env.REGISTRY_IMAGE, matrix.codename) }} --build-arg FROM_IMAGE='buildpack-deps' From 1c6dfff404e846272bd0cda897e34528f02e05d1 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 16 Sep 2023 21:30:12 +0200 Subject: [PATCH 2/2] split platforms for PRs - docker driver doesn't support the export of manifest lists - couldn't get another exporter to work with docker scout --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41f91d4..32932b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - platforms: ['linux/amd64,linux/arm64'] - # platforms: ${{ github.ref == 'refs/heads/main' && fromJson('["linux/amd64,linux/arm64"]') || fromJson(format('["{0}", "{1}"]', 'linux/amd64','linux/arm64')) }} + # platforms: ['linux/amd64,linux/arm64'] + platforms: ${{ github.event_name == 'pull_request' && fromJson(format('["{0}", "{1}"]', 'linux/amd64','linux/arm64')) || fromJson('["linux/amd64,linux/arm64"]') }} from-version: ['22.04', '20.04'] include: - from-version: '22.04'