@@ -28,22 +28,19 @@ 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
4845 - name : Generate Image Name
4946 env :
@@ -53,16 +50,17 @@ jobs:
5350 if [[ "${GITHUB_REF}" != "refs/heads/master" ]] ; then
5451 test_name="test-${BRANCH_NAME////_}-"
5552 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}
53+ echo "IMAGE_NAME=ghcr.io/lifting-bits/cxx-common/${test_name}vcpkg-builder-ubuntu-${{ env.IMAGE_VER }}:${{ matrix.container.version }}" >> ${GITHUB_ENV}
5754
5855 - name : Build image
5956 working-directory : docker
6057 run : |
6158 # Pull freshest ubuntu Docker image
62- docker pull ubuntu:${{ matrix.container.version}}
59+ docker pull --platform "${{ matrix.platform }}" ubuntu:${{ matrix.container.version}}
6360
6461 docker build -f Dockerfile.ubuntu.vcpkg \
6562 --no-cache \
63+ --platform "${{ matrix.platform }}" \
6664 --target caching \
6765 --build-arg "DISTRO_VERSION=${{ matrix.container.codename }}" \
6866 -t "${IMAGE_NAME}" \
0 commit comments