@@ -28,23 +28,22 @@ jobs:
2828 strategy :
2929 fail-fast : false
3030 matrix :
31- # arch is to tag docker images for uniqueness
32- host :
33- - { name: 'ubuntu-22.04', arch: '' }
3431 container :
3532 - { version: '22.04', codename: 'jammy' }
33+ platform :
34+ - ' linux/amd64'
35+ - ' linux/arm64/v8' # Apple Silicon Linux support
3636
37- runs-on : ${{ matrix.host.name }}
37+ runs-on : ubuntu-22.04
3838
3939 permissions :
4040 packages : write
4141 contents : read
4242
4343 steps :
44- - name : Cleanup working directory with container root
45- run : |
46- docker run --rm -v $(pwd):/workspace -w /workspace ubuntu:latest find . -name . -o -prune -exec rm -rf -- {} + || true
4744 - uses : actions/checkout@v4
45+ - name : Set up QEMU
46+ uses : docker/setup-qemu-action@v3
4847 - name : Generate Image Name
4948 env :
5049 BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
@@ -53,16 +52,17 @@ jobs:
5352 if [[ "${GITHUB_REF}" != "refs/heads/master" ]] ; then
5453 test_name="test-${BRANCH_NAME////_}-"
5554 fi
56- echo "IMAGE_NAME=ghcr.io/lifting-bits/cxx-common/${test_name}vcpkg-builder-ubuntu-${{ env.IMAGE_VER }}:${{ matrix.container.version }}${{ matrix.host.arch }} " >> ${GITHUB_ENV}
55+ echo "IMAGE_NAME=ghcr.io/lifting-bits/cxx-common/${test_name}vcpkg-builder-ubuntu-${{ env.IMAGE_VER }}:${{ matrix.container.version }}" >> ${GITHUB_ENV}
5756
5857 - name : Build image
5958 working-directory : docker
6059 run : |
6160 # Pull freshest ubuntu Docker image
62- docker pull ubuntu:${{ matrix.container.version}}
61+ docker pull --platform "${{ matrix.platform }}" ubuntu:${{ matrix.container.version}}
6362
6463 docker build -f Dockerfile.ubuntu.vcpkg \
6564 --no-cache \
65+ --platform "${{ matrix.platform }}" \
6666 --target caching \
6767 --build-arg "DISTRO_VERSION=${{ matrix.container.codename }}" \
6868 -t "${IMAGE_NAME}" \
0 commit comments